diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2005-03-14 05:16:59 -0500 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2005-10-29 14:30:56 -0400 |
commit | 71e0e556db08cc20de76d510be5600f6e5ce143c (patch) | |
tree | da5afa71e99ad20dd08b10a9ed25624c3d64929f | |
parent | a3701ca48763bbc681ee8db3d203827975849185 (diff) |
Multithreaded core dumps.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
-rw-r--r-- | arch/mips/kernel/process.c | 8 | ||||
-rw-r--r-- | include/asm-mips/elf.h | 2 |
2 files changed, 10 insertions, 0 deletions
diff --git a/arch/mips/kernel/process.c b/arch/mips/kernel/process.c index 5223c4450e4c..2b7a44deb856 100644 --- a/arch/mips/kernel/process.c +++ b/arch/mips/kernel/process.c | |||
@@ -167,6 +167,14 @@ void dump_regs(elf_greg_t *gp, struct pt_regs *regs) | |||
167 | #endif | 167 | #endif |
168 | } | 168 | } |
169 | 169 | ||
170 | int dump_task_regs (struct task_struct *tsk, elf_gregset_t *regs) | ||
171 | { | ||
172 | struct thread_info *ti = tsk->thread_info; | ||
173 | long ksp = (unsigned long)ti + THREAD_SIZE - 32; | ||
174 | dump_regs(&(*regs)[0], (struct pt_regs *) ksp - 1); | ||
175 | return 1; | ||
176 | } | ||
177 | |||
170 | int dump_task_fpu (struct task_struct *t, elf_fpregset_t *fpr) | 178 | int dump_task_fpu (struct task_struct *t, elf_fpregset_t *fpr) |
171 | { | 179 | { |
172 | memcpy(fpr, &t->thread.fpu, sizeof(current->thread.fpu)); | 180 | memcpy(fpr, &t->thread.fpu, sizeof(current->thread.fpu)); |
diff --git a/include/asm-mips/elf.h b/include/asm-mips/elf.h index a743da55e110..bb031f3cd4db 100644 --- a/include/asm-mips/elf.h +++ b/include/asm-mips/elf.h | |||
@@ -225,10 +225,12 @@ do { current->thread.mflags &= ~MF_ABI_MASK; \ | |||
225 | #endif /* CONFIG_64BIT */ | 225 | #endif /* CONFIG_64BIT */ |
226 | 226 | ||
227 | extern void dump_regs(elf_greg_t *, struct pt_regs *regs); | 227 | extern void dump_regs(elf_greg_t *, struct pt_regs *regs); |
228 | extern int dump_task_regs (struct task_struct *, elf_gregset_t *); | ||
228 | extern int dump_task_fpu(struct task_struct *, elf_fpregset_t *); | 229 | extern int dump_task_fpu(struct task_struct *, elf_fpregset_t *); |
229 | 230 | ||
230 | #define ELF_CORE_COPY_REGS(elf_regs, regs) \ | 231 | #define ELF_CORE_COPY_REGS(elf_regs, regs) \ |
231 | dump_regs((elf_greg_t *)&(elf_regs), regs); | 232 | dump_regs((elf_greg_t *)&(elf_regs), regs); |
233 | #define ELF_CORE_COPY_TASK_REGS(tsk, elf_regs) dump_task_regs(tsk, elf_regs) | ||
232 | #define ELF_CORE_COPY_FPREGS(tsk, elf_fpregs) \ | 234 | #define ELF_CORE_COPY_FPREGS(tsk, elf_fpregs) \ |
233 | dump_task_fpu(tsk, elf_fpregs) | 235 | dump_task_fpu(tsk, elf_fpregs) |
234 | 236 | ||