Skip to contentSkip to conversation

ARM: ELF: Add register information of threads to coredump

PATCH New Artem Bityutskiy 2 participants 3 messages Oct 11, 2009 – Oct 13, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: ELF: Add register information of threads to coredump

From: Mika Westerberg <[email protected]>

Defines ELF_CORE_COPY_TASK_REGS so that CPU register information of every thread is included in coredump. Without this, only the faulting thread is coredumped.

Cc Roger Quadros <[email protected]>
Cc linux-arm-kernel at lists.infradead.org
---
 arch/arm/include/asm/elf.h |    3 +++
 arch/arm/kernel/process.c  |    9 +++++++++
 2 files changed, 12 insertions(+), 0 deletions(-)
arch/arm/include/asm/elf.h +3 -0
index c3b911e..6aac3f5 100644
@@ -98,6 +98,9 @@ extern int elf_check_arch(const struct elf32_hdr *);
 extern int arm_elf_read_implies_exec(const struct elf32_hdr *, int);
 #define elf_read_implies_exec(ex,stk) arm_elf_read_implies_exec(&(ex), stk)
 
+int dump_task_regs(struct task_struct *t, elf_gregset_t *elfregs);
+#define ELF_CORE_COPY_TASK_REGS dump_task_regs
+
 #define USE_ELF_CORE_DUMP
 #define ELF_EXEC_PAGESIZE	4096
 
arch/arm/kernel/process.c +9 -0
index 790fbee..0d96d01 100644
@@ -328,6 +328,15 @@ copy_thread(unsigned long clone_flags, unsigned long stack_start,
 }
 
 /*
+ * Fill in the task's elfregs structure for a core dump.
+ */
+int dump_task_regs(struct task_struct *t, elf_gregset_t *elfregs)
+{
+	elf_core_copy_regs(elfregs, task_pt_regs(t));
+	return 1;
+}
+
+/*
  * fill in the fpe structure for a core dump...
  */
 int dump_fpu (struct pt_regs *regs, struct user_fp *fp)
Signature · 1 line
1.6.2.5
#1 lore raw

PATCH 1/1 ARM: ELF: Add register information of threads to coredump

Quoted 10 lines · Artem Bityutskiy

From: Mika Westerberg <[email protected]>

Defines ELF_CORE_COPY_TASK_REGS so that CPU register information of every thread is included in coredump. Without this, only the faulting thread is coredumped.

Cc Roger Quadros <[email protected]>
Cc linux-arm-kernel at lists.infradead.org

Please send to the patch system.

#2 lore raw

PATCH 1/1 ARM: ELF: Add register information of threads to coredump

Quoted 7 lines · Russell King - ARM Linux
Quoted 6 lines · Artem Bityutskiy

From: Mika Westerberg <[email protected]>

Defines ELF_CORE_COPY_TASK_REGS so that CPU register information of every thread is included in coredump. Without this, only the faulting thread is coredumped.

Quoted 6 lines
Quoted 4 lines
Cc Roger Quadros <[email protected]>
Cc linux-arm-kernel at lists.infradead.org

Please send to the patch system.

OK, done.

Signature · 2 lines
Best Regards,
Artem Bityutskiy (????? ????????)