diff options
author | Stas Sergeev <stsp@aknet.ru> | 2005-12-31 20:18:52 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-12-31 21:01:57 -0500 |
commit | 557962a926c62a9c4bd79d6b36df873d4f8c51ef (patch) | |
tree | f0056d09f2a2fc3bb2ea427aa189351b07400a52 /arch | |
parent | de9e007d9105bf8fa613a89810feff32a43add03 (diff) |
[PATCH] x86: teach dump_task_regs() about the -8 offset.
This should fix multi-threaded core-files
Signed-off-by: stsp@aknet.ru
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/i386/kernel/process.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/i386/kernel/process.c b/arch/i386/kernel/process.c index df6c2bcde067..2333aead0563 100644 --- a/arch/i386/kernel/process.c +++ b/arch/i386/kernel/process.c | |||
@@ -554,7 +554,9 @@ int dump_task_regs(struct task_struct *tsk, elf_gregset_t *regs) | |||
554 | struct pt_regs ptregs; | 554 | struct pt_regs ptregs; |
555 | 555 | ||
556 | ptregs = *(struct pt_regs *) | 556 | ptregs = *(struct pt_regs *) |
557 | ((unsigned long)tsk->thread_info+THREAD_SIZE - sizeof(ptregs)); | 557 | ((unsigned long)tsk->thread_info + |
558 | /* see comments in copy_thread() about -8 */ | ||
559 | THREAD_SIZE - sizeof(ptregs) - 8); | ||
558 | ptregs.xcs &= 0xffff; | 560 | ptregs.xcs &= 0xffff; |
559 | ptregs.xds &= 0xffff; | 561 | ptregs.xds &= 0xffff; |
560 | ptregs.xes &= 0xffff; | 562 | ptregs.xes &= 0xffff; |