]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ARM: 6798/1: aout-core: zero thread debug registers in a.out core dump
authorWill Deacon <will.deacon@arm.com>
Thu, 10 Mar 2011 13:03:01 +0000 (14:03 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Thu, 10 Mar 2011 15:16:29 +0000 (15:16 +0000)
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>
arch/arm/include/asm/a.out-core.h
arch/arm/include/asm/user.h

index 93d04acaa31fdb1f0d9b9cdf27e745e3d1209e2f..92f10cb5c70cc81161f978642fdfdddebf9b1a15 100644 (file)
@@ -32,11 +32,7 @@ static inline void aout_dump_thread(struct pt_regs *regs, struct user *dump)
        dump->u_dsize = (tsk->mm->brk - tsk->mm->start_data + PAGE_SIZE - 1) >> PAGE_SHIFT;
        dump->u_ssize = 0;
 
-       dump->u_debugreg[0] = tsk->thread.debug.bp[0].address;
-       dump->u_debugreg[1] = tsk->thread.debug.bp[1].address;
-       dump->u_debugreg[2] = tsk->thread.debug.bp[0].insn.arm;
-       dump->u_debugreg[3] = tsk->thread.debug.bp[1].insn.arm;
-       dump->u_debugreg[4] = tsk->thread.debug.nsaved;
+       memset(dump->u_debugreg, 0, sizeof(dump->u_debugreg));
 
        if (dump->start_stack < 0x04000000)
                dump->u_ssize = (0x04000000 - dump->start_stack) >> PAGE_SHIFT;
index 05ac4b06876a0c30b3f49dc2ad9652f20a63f9e5..35917b3a97f915d24e48ab30facddd744b3e0775 100644 (file)
@@ -71,7 +71,7 @@ struct user{
                                /* the registers. */
   unsigned long magic;         /* To uniquely identify a core file */
   char u_comm[32];             /* User command that was responsible */
-  int u_debugreg[8];
+  int u_debugreg[8];           /* No longer used */
   struct user_fp u_fp;         /* FP state */
   struct user_fp_struct * u_fp0;/* Used by gdb to help find the values for */
                                /* the FP registers. */