diff options
author | Will Deacon <will.deacon@arm.com> | 2011-03-10 08:03:01 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-03-10 10:16:29 -0500 |
commit | 23bfdacf4eb525ff3404161429cedaa281c23e47 (patch) | |
tree | 82b850e1d22d617cc3e9e648325df38c4ed97c23 /arch/arm/include/asm/a.out-core.h | |
parent | 6fa85e5ce311a8c57fe32cb6403961f7a897112d (diff) |
ARM: 6798/1: aout-core: zero thread debug registers in a.out core dump
The removal of the single-step emulation from ptrace on ARM means that
thread_struct no longer has software breakpoint fields in its debug
member.
This patch fixes the a.out core dump code so that the debug registers
are zeroed rather than trying to copy from non-existent fields.
Cc: Nicolas Pitre <nicolas.pitre@linaro.org>
Signed-off-by: Bryan Wu <bryan.wu@canonical.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/include/asm/a.out-core.h')
-rw-r--r-- | arch/arm/include/asm/a.out-core.h | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/arch/arm/include/asm/a.out-core.h b/arch/arm/include/asm/a.out-core.h index 93d04acaa31f..92f10cb5c70c 100644 --- a/arch/arm/include/asm/a.out-core.h +++ b/arch/arm/include/asm/a.out-core.h | |||
@@ -32,11 +32,7 @@ static inline void aout_dump_thread(struct pt_regs *regs, struct user *dump) | |||
32 | dump->u_dsize = (tsk->mm->brk - tsk->mm->start_data + PAGE_SIZE - 1) >> PAGE_SHIFT; | 32 | dump->u_dsize = (tsk->mm->brk - tsk->mm->start_data + PAGE_SIZE - 1) >> PAGE_SHIFT; |
33 | dump->u_ssize = 0; | 33 | dump->u_ssize = 0; |
34 | 34 | ||
35 | dump->u_debugreg[0] = tsk->thread.debug.bp[0].address; | 35 | memset(dump->u_debugreg, 0, sizeof(dump->u_debugreg)); |
36 | dump->u_debugreg[1] = tsk->thread.debug.bp[1].address; | ||
37 | dump->u_debugreg[2] = tsk->thread.debug.bp[0].insn.arm; | ||
38 | dump->u_debugreg[3] = tsk->thread.debug.bp[1].insn.arm; | ||
39 | dump->u_debugreg[4] = tsk->thread.debug.nsaved; | ||
40 | 36 | ||
41 | if (dump->start_stack < 0x04000000) | 37 | if (dump->start_stack < 0x04000000) |
42 | dump->u_ssize = (0x04000000 - dump->start_stack) >> PAGE_SHIFT; | 38 | dump->u_ssize = (0x04000000 - dump->start_stack) >> PAGE_SHIFT; |