diff options
Diffstat (limited to 'arch/powerpc/kernel/ptrace32.c')
-rw-r--r-- | arch/powerpc/kernel/ptrace32.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/ptrace32.c b/arch/powerpc/kernel/ptrace32.c index 8c21658719d9..c0244e766834 100644 --- a/arch/powerpc/kernel/ptrace32.c +++ b/arch/powerpc/kernel/ptrace32.c | |||
@@ -252,6 +252,9 @@ long compat_arch_ptrace(struct task_struct *child, compat_long_t request, | |||
252 | } | 252 | } |
253 | 253 | ||
254 | case PTRACE_GET_DEBUGREG: { | 254 | case PTRACE_GET_DEBUGREG: { |
255 | #ifndef CONFIG_PPC_ADV_DEBUG_REGS | ||
256 | unsigned long dabr_fake; | ||
257 | #endif | ||
255 | ret = -EINVAL; | 258 | ret = -EINVAL; |
256 | /* We only support one DABR and no IABRS at the moment */ | 259 | /* We only support one DABR and no IABRS at the moment */ |
257 | if (addr > 0) | 260 | if (addr > 0) |
@@ -259,7 +262,10 @@ long compat_arch_ptrace(struct task_struct *child, compat_long_t request, | |||
259 | #ifdef CONFIG_PPC_ADV_DEBUG_REGS | 262 | #ifdef CONFIG_PPC_ADV_DEBUG_REGS |
260 | ret = put_user(child->thread.dac1, (u32 __user *)data); | 263 | ret = put_user(child->thread.dac1, (u32 __user *)data); |
261 | #else | 264 | #else |
262 | ret = put_user(child->thread.dabr, (u32 __user *)data); | 265 | dabr_fake = ( |
266 | (child->thread.hw_brk.address & (~HW_BRK_TYPE_DABR)) | | ||
267 | (child->thread.hw_brk.type & HW_BRK_TYPE_DABR)); | ||
268 | ret = put_user(dabr_fake, (u32 __user *)data); | ||
263 | #endif | 269 | #endif |
264 | break; | 270 | break; |
265 | } | 271 | } |