linux-cvs-patches
[Top] [All Lists]

CVS Update@linux-mips.org: linux

To: linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
From: ralf@linux-mips.org
Date: Mon, 14 Mar 2005 10:17:04 +0000
Reply-to: linux-mips@linux-mips.org
Sender: linux-cvs-patches-bounce@linux-mips.org
CVSROOT:        /home/cvs
Module name:    linux
Changes by:     ralf@ftp.linux-mips.org 05/03/14 10:16:59

Modified files:
        arch/mips/kernel: process.c 
        include/asm-mips: elf.h 

Log message:
        Multithreaded core dumps.

diff -urN linux/arch/mips/kernel/process.c linux/arch/mips/kernel/process.c
--- linux/arch/mips/kernel/process.c    2005/03/01 21:20:47     1.76
+++ linux/arch/mips/kernel/process.c    2005/03/14 10:16:59     1.77
@@ -167,6 +167,14 @@
 #endif
 }
 
+int dump_task_regs (struct task_struct *tsk, elf_gregset_t *regs)
+{
+       struct thread_info *ti = tsk->thread_info;
+       long ksp = (unsigned long)ti + THREAD_SIZE - 32;
+       dump_regs(&(*regs)[0], (struct pt_regs *) ksp - 1);
+       return 1;
+}
+
 int dump_task_fpu (struct task_struct *t, elf_fpregset_t *fpr)
 {
        memcpy(fpr, &t->thread.fpu, sizeof(current->thread.fpu));
diff -urN linux/include/asm-mips/elf.h linux/include/asm-mips/elf.h
--- linux/include/asm-mips/elf.h        2005/02/19 05:56:51     1.25
+++ linux/include/asm-mips/elf.h        2005/03/14 10:16:59     1.26
@@ -225,10 +225,12 @@
 #endif /* CONFIG_MIPS64 */
 
 extern void dump_regs(elf_greg_t *, struct pt_regs *regs);
+extern int dump_task_regs (struct task_struct *, elf_gregset_t *);
 extern int dump_task_fpu(struct task_struct *, elf_fpregset_t *);
 
 #define ELF_CORE_COPY_REGS(elf_regs, regs)                     \
        dump_regs((elf_greg_t *)&(elf_regs), regs);
+#define ELF_CORE_COPY_TASK_REGS(tsk, elf_regs) dump_task_regs(tsk, elf_regs)
 #define ELF_CORE_COPY_FPREGS(tsk, elf_fpregs)                  \
        dump_task_fpu(tsk, elf_fpregs)
 

<Prev in Thread] Current Thread [Next in Thread>