gdbserver sparc solaris

Pedro Alves palves@redhat.com
Fri Feb 8 13:26:00 GMT 2019


On 02/08/2019 01:05 PM, Rainer Orth wrote:
> Hi Pedro,

Hi Rainer,

>>> Is it possible to get gdbserver to work on sparc solaris?  
>>
>> Not without someone porting gdbserver to solaris.
> 
> I had a very quick look at that once, but the code is currently full of
> Linux dependencies (...)

Hmm, that doesn't seem correct?  There should be no Linux dependencies like
that.  There are ports of GDBserver for Linux, Windows/mingw and NTO/QNX.
Each of those gets its own *-low.c file, which is the equivalent of GDB's
-nat.c files.  So gdb/linux-nat.c is similar to gdbserver/linux-low.c.  Etc.

Basically, a Solaris port would mean copying over gdb/procfs.c and friends
to gdbserver/, and adjusting them to gdbserver's interfaces.  Well, ideally,
we'd refactor the gdb/procfs.c code a bit so that we could use it for both
gdb and gdbserver, instead of just copying over.  The fact that the Linux
backend implementations in gdb and gdbserver are different was a bad design
mistake that we're still trying to correct [1] [2].

> (...) had no actual need for a port.  Given that this
> will be a major effort, I certainly won't undertake it myself.

Certainly understandable!

[1] https://sourceware.org/gdb/wiki/Common
[2] https://sourceware.org/gdb/wiki/LocalRemoteFeatureParity

Thanks,
Pedro Alves



More information about the Gdb mailing list