diff options
author | Felix Fietkau <nbd@openwrt.org> | 2009-06-14 20:42:33 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2009-06-14 20:42:33 +0000 |
commit | f88360279f91387dc61725226ad38c3c95d3790a (patch) | |
tree | 66d21f3483914eb7e674c45f3497ab8912094ac0 /target/linux/goldfish/patches-2.6.30/0061--ARM-Save-thread-registers-in-coredumps.patch | |
parent | a6d8f8be9e06c5ffb03f815c8c76ba743c64aa3d (diff) | |
download | upstream-f88360279f91387dc61725226ad38c3c95d3790a.tar.gz upstream-f88360279f91387dc61725226ad38c3c95d3790a.tar.bz2 upstream-f88360279f91387dc61725226ad38c3c95d3790a.zip |
add the 'goldfish' target, useful for experimenting with virtual phone hardware (includes the emulator)
SVN-Revision: 16459
Diffstat (limited to 'target/linux/goldfish/patches-2.6.30/0061--ARM-Save-thread-registers-in-coredumps.patch')
-rw-r--r-- | target/linux/goldfish/patches-2.6.30/0061--ARM-Save-thread-registers-in-coredumps.patch | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/target/linux/goldfish/patches-2.6.30/0061--ARM-Save-thread-registers-in-coredumps.patch b/target/linux/goldfish/patches-2.6.30/0061--ARM-Save-thread-registers-in-coredumps.patch new file mode 100644 index 0000000000..44f78b6385 --- /dev/null +++ b/target/linux/goldfish/patches-2.6.30/0061--ARM-Save-thread-registers-in-coredumps.patch @@ -0,0 +1,50 @@ +From 784b170a69906c48a688a9ffa7512fc858f8836c Mon Sep 17 00:00:00 2001 +From: =?utf-8?q?Arve=20Hj=C3=B8nnev=C3=A5g?= <arve@android.com> +Date: Sun, 30 Mar 2008 21:36:29 -0700 +Subject: [PATCH 061/134] [ARM] Save thread registers in coredumps + +Signed-off-by: Brian Swetland <swetland@google.com> +--- + arch/arm/include/asm/elf.h | 6 ++++++ + arch/arm/kernel/process.c | 10 ++++++++++ + 2 files changed, 16 insertions(+), 0 deletions(-) + +--- a/arch/arm/include/asm/elf.h ++++ b/arch/arm/include/asm/elf.h +@@ -86,6 +86,10 @@ extern char elf_platform[]; + + struct elf32_hdr; + ++struct task_struct; ++ ++extern int dump_task_regs (struct task_struct *, elf_gregset_t *); ++ + /* + * This is used to ensure we don't load something for the wrong architecture. + */ +@@ -113,4 +117,6 @@ extern int arm_elf_read_implies_exec(con + extern void elf_set_personality(const struct elf32_hdr *); + #define SET_PERSONALITY(ex) elf_set_personality(&(ex)) + ++#define ELF_CORE_COPY_TASK_REGS(tsk, elf_regs) dump_task_regs(tsk, elf_regs) ++ + #endif +--- a/arch/arm/kernel/process.c ++++ b/arch/arm/kernel/process.c +@@ -337,6 +337,16 @@ int dump_fpu (struct pt_regs *regs, stru + EXPORT_SYMBOL(dump_fpu); + + /* ++ * Capture the user space registers if the task is not running (in user space) ++ */ ++int dump_task_regs(struct task_struct *tsk, elf_gregset_t *regs) ++{ ++ struct pt_regs ptregs = *task_pt_regs(tsk); ++ elf_core_copy_regs(regs, &ptregs); ++ return 1; ++} ++ ++/* + * Shuffle the argument into the correct register before calling the + * thread function. r1 is the thread argument, r2 is the pointer to + * the thread function, and r3 points to the exit function. |