This is the mail archive of the
libc-hacker@sourceware.cygnus.com
mailing list for the glibc project.
Re: A linux patch for a typo
- To: torvalds@transmeta.com (Linus Torvalds)
- Subject: Re: A linux patch for a typo
- From: hjl@lucon.org (H.J. Lu)
- Date: Mon, 25 May 1998 16:21:35 -0700 (PDT)
- Cc: hjl@lucon.org, libc-hacker@cygnus.com, egcs@cygnus.com, linux-gcc@vger.rutgers.edu, kjahds@kjahds.com, lmfken@lmf.ericsson.se, ian@lasermoon.co.uk, mat@lcs.mit.edu, doughera@lafcol.lafayette.edu, brian@mathworks.com, john@etools.com, craig@metrolink.com, imp@village.org, robf@Willows.Com, meissner@cygnus.com, rfg@monkeys.com, roell@xinside.com, burley@gnu.org, linux-binutils-in@polstra.com, galenh@micron.net, ralf@mailhost.uni-koblenz.de
>
>
>
> On Mon, 25 May 1998, H.J. Lu wrote:
> > >
> > > User level code should never EVER touch this structure. If anything you
> >
> > I am working a gdb patch. It needs to know that.
>
> No, it needs to know the stuff that is in <asm/user.h>
>
> > Here is my copy of the original linux/include/asm-i386/ptrace.h in
> > kernel 2.1.103. Unless yours is different from mine, please tell me
> > where are the fields in struct pt_regs for FS and GS
>
> There ARE no %fs and %gs registers _anywhere_ in the kernel stack
> structure. They used to be there, and they still appear in the
> "user_pt_regs" structure in the place where they used to appear.
>
That is very misleading. Those index macros for "struct user_regs_struct"
used by the user programs, EBX, ECX, EDX, ...., are defined in
linux/include/asm-i386/ptrace.h together with the kernel "struct pt_regs".
Should they be moved into linux/include/asm-i386/usr.h with
"struct user_regs_struct"? It doesn't make much senses to me.
H.J.