This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [PATCH] Make ARM/Linux build on current glibc


On Wed, Oct 31, 2001 at 07:18:27PM +0100, Mark Kettenis wrote:
>    Date: Wed, 31 Oct 2001 11:20:35 -0500
>    From: Daniel Jacobowitz <drow@mvista.com>
> 
>    On Wed, Oct 31, 2001 at 05:12:40PM +0100, Mark Kettenis wrote:
>    > Daniel Jacobowitz <drow@mvista.com> writes:
>    > 
>    > > On Wed, Oct 31, 2001 at 10:57:47AM -0500, Daniel Jacobowitz wrote:
>    > > > <sys/user.h> no longer includes <asm/ptrace.h>.  If we want it, we've got to
>    > > > get it ourselves.
>    > > 
>    > > Right... include the patch..
>    > > 
>    > > Committed as obvious.
>    > 
>    > In principle we shouldn't include any <asm/*> on Linux.  Why do you
>    > need to include <asm/ptrace.h>?
> 
>    Because <sys/user.h> used to and no longer does.  If you prefer I can
>    define the structure (pt_regs) in the file itself.
> 
> Ah, I missed `struct pt_regs'.  Hmm.  On the i386 ptrace(PTRACE_GETREGS,...)
> doesn't return a `struct pt_regs'.
> 
>    <sys/user.h> now uses a "struct user_regs" instead, but we can't use
>    that without requiring glibc 2.2.x.
> 
> I'd use elf_gregset_t instead.  Should work with all versions of glibc
> as long as you include <sys/procfs.h>.  Looks like there's quite a bit
> of redundant code in arm-linux-nat.c.  Feel free to clean it up a bit :-).

I guess an elf_gregset_t should work in all cases.  I'll try that and
commit later today.  It looks as if it's always the right size. 
Cleaning it up is buried somewhere on my todo list, since I'm not
especially fond of ARM :)

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]