lkml.org 
[lkml]   [2006]   [Dec]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [-mm patch] ptrace: Fix EFL_OFFSET value according to i386 pda changes (was Re: BUG on 2.6.20-rc1 when using gdb)
On Wed, Dec 20, 2006 at 12:53:33PM -0800, Jeremy Fitzhardinge wrote:
> Frederik Deweerdt wrote:
> > It works too, thanks. BTW, I wondered if the "case GS:" in getreg() made
> > sense now?
>
> Sorry, what do you mean? It looks OK to me, but I'm not sure what
> you're referring to.
My bad, that's the code I'm referring to:

121 static unsigned long getreg(struct task_struct *child,
122 unsigned long regno)
[...]
126 switch (regno >> 2) {
127 case GS:
128 retval = child->thread.gs;
129 break;

What seem weird to me is that putreg(GS) will end up putting 'value' in:
child->thread.esp0 - sizeof(struct pt_regs) + (GS - 1)*4
whereas getreg(GS) will return the value of child->thread.gs
I must miss something, but the symetry seemed odd to me.

Regards,
Frederik
>
> J
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-12-20 22:13    [W:0.038 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site