lkml.org 
[lkml]   [2005]   [Dec]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: Multi-thread corefiles broken since April
Hi.

Adrian Bunk wrote:
> On Wed, Dec 07, 2005 at 10:52:52PM -0800, Steve Work wrote:
>> Or do the corefile
>> write routines need to know about this adjusted offset?
I think so, the attached patch seem to help.

Happy new year and happy hacking!


-----
teach dump_task_regs() about the -8 offset.

Signed-off-by: stsp@aknet.ru

--- linux/arch/i386/kernel/process.c.old 2005-08-07 21:58:25.000000000 +0400
+++ linux/arch/i386/kernel/process.c 2006-01-01 03:03:10.000000000 +0300
@@ -573,7 +573,9 @@
struct pt_regs ptregs;

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.xds &= 0xffff;
ptregs.xes &= 0xffff;
\
 
 \ /
  Last update: 2006-01-01 02:24    [W:0.063 / U:0.580 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site