This is the mail archive of the gdb-patches@sourceware.cygnus.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: GDB 5.0 won't build on GNU/Linux/sparc


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

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