提交 557962a9 编写于 作者: S Stas Sergeev 提交者: Linus Torvalds

[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: NLinus Torvalds <torvalds@osdl.org>
上级 de9e007d
...@@ -554,7 +554,9 @@ int dump_task_regs(struct task_struct *tsk, elf_gregset_t *regs) ...@@ -554,7 +554,9 @@ int dump_task_regs(struct task_struct *tsk, elf_gregset_t *regs)
struct pt_regs ptregs; struct pt_regs ptregs;
ptregs = *(struct pt_regs *) ptregs = *(struct pt_regs *)
((unsigned long)tsk->thread_info+THREAD_SIZE - sizeof(ptregs)); ((unsigned long)tsk->thread_info +
/* see comments in copy_thread() about -8 */
THREAD_SIZE - sizeof(ptregs) - 8);
ptregs.xcs &= 0xffff; ptregs.xcs &= 0xffff;
ptregs.xds &= 0xffff; ptregs.xds &= 0xffff;
ptregs.xes &= 0xffff; ptregs.xes &= 0xffff;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册