Re: Fix gdb 7.12 C++ compilation on Solaris

Rainer Orth
2016-10-25T14:19:00Z

Hi Pedro,

> On 10/19/2016 12:53 PM, Rainer Orth wrote:
>
>> Besides, given that GCC 4.9 was the last version to support Solaris 9,
>> one might consider deprecating/removing anything before Solaris 10 in
>> gdb, too.
>
> That's be fine with me, but then again, I don't really use
> Solaris at all. :-)

ok, I'll go ahead with this assumption then: should there really exist
any Solaris 8 or 9 users out in the wild, the can stay with gdb 7.12 if
they must...

>> I'll see if I can find some spare cycles to clean procfs.c and friends
>> up: there are tons of opportunities with anything but Solaris gone as
>> clients of that file and a couple related ones.
>>
>>> FYI, AFAIK, no GDB maintainer cares for/tests on Solaris
>>> routinely nowadays.

I've no made a first cut at stripping procfs.c and friends of
non-Solaris support: the files shrink nicely from that :-) Will need
proper testing (this time with full testsuite runs) on Solaris 10-12,
sparc and x86, 32 and 64-bit before posting, though.

>> Neither do I: just whenever a new gdb or binutils release arrives, I
>> give them a try. I'm way behind even on Solaris/gcc maintenance, so I
>> fear there's not much I can do about gdb on that front. However,
>> there's a couple of Solaris patches for gdb 7.11 here:
>>
>> https://java.net/projects/solaris-userland/sources/gate/show/components/gdb/patches?rev=7127
>>
>> Perhaps the authors can be motivated to contribute them upstream as they
>> obviously intended ;-)
>
> Indeed. (That page is not opening for me, server seems slow, can't see
> what the patches are about.)

java.net can be dog slow at times ;-( The easiest and quickest way to
get at the stuff is probably to

$ hg clone https://hg.java.net/hg/solaris-userland~gate/

The patches are in components/gdb/patches. I've looked over them and
there are four groups of changes:

* handle NT_LWPSTATUS notes in core files.

* predefine SOLARIS for target specific code

* Solaris support in features

* Solaris support in syscalls

For the last two, however, I see no initialize_tdesc_* or
set_xml_syscall_file_name calls to make use of them. Very strange...

>>>> Still ok for mainline?
>>>
>>> Still OK.
>>
>> Thanks. I'll commit as soon as I've sorted some problem with hg-git
>> out: plain git is completely unusable for me.
>>
>
> Thanks.
>
> (FYI, we don't just put the ChangeLog entry in the commit log
> like gcc does. If you include the description of the problem as you
> had in the email in the git commit log, that'd be great.)

I see. I've now committed the patch after another round of testing on
i386-pc-solaris2.10 (both 32 and 64-bit).

>> What about the 7.12 branch backport with the PR now filed?
>
> You just need to cherry pick the fix to the gdb-7.12-branch branch
> and push it. Just leave the atof call in place under !__cplusplus
> in the branch version, like you had in the original version, in case
> that was really necessary on some host.

Did so as well.