bug-gdb
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GDB 5.0 -> gdbserver -> Port to Sun Sparc Solaris 2.6+


From: Kevin Buettner
Subject: Re: GDB 5.0 -> gdbserver -> Port to Sun Sparc Solaris 2.6+
Date: Mon, 6 Nov 2000 10:43:56 -0700

On Nov 6,  3:26pm, Johan Vermeire WX21 54189 wrote:

> I'm trying to port the gdbserver part of GDB-5.0 to Sun Sparc Solaris 2.6+ .
> 
> I've still a problem with some old structure def's from SunOS 4.* in the
> low-sparc.c module.
> 
> btm0gn:/home/jvme/bin/gdb-5.0/gdb/gdbserver> make CC=gcc
> gcc -c -g     -I. -I.. -I. -I./.. -I./../config -I./../../include -I../../bf
> d -I./../../bfd -DGDBSERVER low-sparc.c
> low-sparc.c: In function `mywait':
> low-sparc.c:130: storage size of `w' isn't known -> union wait w;
> low-sparc.c: In function `fetch_inferior_registers':
> low-sparc.c:179: storage size of `inferior_fp_registers' isn't known ->
> struct fp_status inferior_fp_registers;
> low-sparc.c: In function `store_inferior_registers':
> low-sparc.c:226: storage size of `inferior_fp_registers' isn't known ->
> struct fp_status inferior_fp_registers;
> *** Error code 1
> make: Fatal error: Command failed for target `low-sparc.o'
> 
> The referred SunOS 4.* (or gdb) structure definitions: wait & fp_status are
> probabely vanished in in Solaris 2.6+ (or gdb-5.0 for Solaris 2.6+).
> 
> Does anybody has some hints?

I think that it may be desirable to preserve the old SunOS 4.x code.  If
so, you'll either need to ifdef the present file, or create a new file
for Solaris/sparc.  Which way is better depends upon the number of ifdefs
you find yourself adding and how badly they clutter the present code.

With regard to figuring out what gdbserver ought to do for the various
missing parts, you might take a look at what gdb does for the same
target.  In this case, gdb is using the /proc filesystem as the
debugging interface, so you'll want to look at procfs.c.

(My guess is that you'll be better off creating a new file for dealing
with sparc/solaris.   It'd be really cool if you could make it generic
enough to handle other architectures which use the /proc interface as
well.)

Kevin



reply via email to

[Prev in Thread] Current Thread [Next in Thread]