mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-27 03:10:12 +00:00
Multithreaded core dumps.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
This commit is contained in:
parent
a3701ca487
commit
71e0e556db
2 changed files with 10 additions and 0 deletions
|
@ -167,6 +167,14 @@ void dump_regs(elf_greg_t *gp, struct pt_regs *regs)
|
||||||
#endif
|
#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)
|
int dump_task_fpu (struct task_struct *t, elf_fpregset_t *fpr)
|
||||||
{
|
{
|
||||||
memcpy(fpr, &t->thread.fpu, sizeof(current->thread.fpu));
|
memcpy(fpr, &t->thread.fpu, sizeof(current->thread.fpu));
|
||||||
|
|
|
@ -225,10 +225,12 @@ do { current->thread.mflags &= ~MF_ABI_MASK; \
|
||||||
#endif /* CONFIG_64BIT */
|
#endif /* CONFIG_64BIT */
|
||||||
|
|
||||||
extern void dump_regs(elf_greg_t *, struct pt_regs *regs);
|
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 *);
|
extern int dump_task_fpu(struct task_struct *, elf_fpregset_t *);
|
||||||
|
|
||||||
#define ELF_CORE_COPY_REGS(elf_regs, regs) \
|
#define ELF_CORE_COPY_REGS(elf_regs, regs) \
|
||||||
dump_regs((elf_greg_t *)&(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) \
|
#define ELF_CORE_COPY_FPREGS(tsk, elf_fpregs) \
|
||||||
dump_task_fpu(tsk, elf_fpregs)
|
dump_task_fpu(tsk, elf_fpregs)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue