[lkml]   [2001]   [Dec]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: ptrace on i386
Frank Cornelis wrote:
> Hi,
> In linux/arch/i386/kernel/ptrace.c next code is being used in the xxxreg
> functions:
> if (regno > GS*4)
> regno -= 2*4;
> Why this discontinuity? It doesn't prevent ORIG_EAX and EIP from being
> written and makes the defines CS, EIF, ... from linux/include/asm/ptrace.h
> useless. BTW: regno should really call reg_offset since it's no register
> number but an offset.

It's because the %fs and %gs segment registers are not saved on the
stack upon kernel entry anymore. Thus, the following values have to be
shifted by 2 positions to maintain compatability with the ptrace
register structure.


Brian Gerst
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

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