Fix gdb 8.1 Solaris/SPARC compilation (PR build/22206)
Pedro Alves
palves@redhat.com
Thu Sep 28 14:19:00 GMT 2017
On 09/28/2017 01:40 PM, Rainer Orth wrote:
> Hi Wei-min,
>
>> As for the issues you raised on gdb ADI support for Solaris/SPARC in the
>> bug report,
>> it's never intended to add that support for Solaris. While that Solaris
>> provided a totally
>> different ADI API was a factor, for example, Linux made the information of
>> ADI block
>> size available in the ELF aux record, one needed to make a syscall on
>> Solaris to get that
>> piece of information, it's certainly doable. It was never planned,
>> however, and most likely
>> will never be.
>
> this is extremely unfortunate, Oracle adding ADI support for one OS, but
> not for its own ;-(
>
> However, what's worse is the way in which ADI support was added: when
> you add code to a file shared between different OSes like
> sparc64-tdep.c, it's your responsibility to make sure that this code at
> least doesn't break other SPARC targets. Given how much of the code
> there isn't actually shared (and not sharable, it seems), the approach
> you've take seems wrong to me: it should have been properly factored
> between shared (sparc64-tdep.c) and os-private
> (e.g. sparc64-linux-tdep.c) files to avoid such breakage in the first
> place.
To be fair, that is the sort of issue that should have been pointed out
in review. When I pushed for moving the ADI support out of the nat
files and into tdep files for cross debugging, I don't think I even
remembered Solaris was a thing... Not that I have anything against
Solaris, to be clear. It just didn't cross my mind.
To me, this indicates a few things:
- It's great that the Solaris port is again seeing activity, and
we should strive to make sure that SPARC changes consider it.
- But also someone needs to continually keep an eye on Solaris
lest it ends up forgotten and broken again. We need an official
Solaris port maintainer. Any takers? :-)
- It'd be desirable to have a SPARC Solaris machine build slave
in the GDB buildbot, so that we can offload part of the work to
bots. I wonder whether Oracle can help with this? Might be
difficult with the whole Solaris situation...
Thanks,
Pedro Alves
More information about the Gdb-patches
mailing list