This is the mail archive of the
gdb-patches@sourceware.cygnus.com
mailing list for the GDB project.
Re: GDB 5.0 won't build on GNU/Linux/sparc
- To: Kevin Buettner <kevinb at cygnus dot com>
- Subject: Re: GDB 5.0 won't build on GNU/Linux/sparc
- From: Michael Snyder <msnyder at cygnus dot com>
- Date: Mon, 22 May 2000 19:24:15 -0700
- CC: Alexandre Oliva <aoliva at cygnus dot com>, gdb-patches at sourceware dot cygnus dot com, David Taylor <taylor at cygnus dot com>
- Organization: Cygnus Solutions
- References: <oraehlelgf.fsf@tamanduatei.dcc.unicamp.br> <1000523021152.ZM4540@ocotillo.lan>
Kevin Buettner wrote:
>
> On May 20, 4:21am, Alexandre Oliva wrote:
>
> > gdb/sparc-tdep.c contains code in supply_gregset() and fill_gregset()
> > that will only compile on Solaris/sparc. glibc doesn't define
> > prgreg_t, R_I7, R_PS, R_PC, R_nPC nor R_Y. In fact, registers from i0
> > to i7 aren't even available in glibc's gregset. The solution is to
> > disable USE_PROC_FS, which can be accomplished by #including the
> > generic config/nm-linux.h from config/sparc/nm-linux.h, as all other
> > architecture-specific `nm-linux.h's do
>
> I'm more than a little surprised that supply_gregset() and fill_gregset()
> appear in sparc-tdep.c! In my opinion, they belong in sparc-nat.c.
Well... you're right that their being in sparc-tdep.c is questionable,
but I'm not sure they fit any better in sparc-nat.c, unles that file
is renamed to sparc-solaris-nat.c. These functions are specific to
/proc, which is (one reason) why they would not build on Linux.
If (indeed) sparc-nat.c is peculiar to Solaris, then we could move
all of the #if (USE_PROC_FS) code from sparc-tdep.c to there.
Michael