Fix gdb 8.1 Solaris/SPARC compilation (PR build/22206)

Rainer Orth ro@CeBiTec.Uni-Bielefeld.DE
Thu Sep 28 12:40:00 GMT 2017


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.

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University



More information about the Gdb-patches mailing list