Re: Multi-thread corefiles broken since April

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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: [email protected]

--- 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;

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux