PING^2: [RFA/RFC] fix PR gdb/22670 (pb looking up some symbols when they have a linkage name)

Pedro Alves palves@redhat.com
Mon Mar 26 14:26:00 GMT 2018


Hi Joel,

On 03/19/2018 09:21 PM, Joel Brobecker wrote:
> On Wed, Feb 21, 2018 at 07:02:11AM +0400, Joel Brobecker wrote:
>>>> All in all, I think a better solution would be to put that information
>>>> directly in the language_defn itself, via a new "attribute".
>>>> Something like a...
>>>
>>> I ended up choosing this approach. lookup names is still a bit
>>> foggy for me, so the comments I wrote and/or the name of the
>>> new language_defn attribute might be a bit off. As always, I am
>>> grateful for suggestions :).

I looked again at this today, and I couldn't think of a better
option right now.  So I think you should go ahead and push this in.

Note that this C++ mangled form like in "symada__cS", is not
actually how C++ symbols are mangled nowadays.  The modern Itanium
mangling scheme has linkage names that always start with "_Z".  In this
case, "void symada(char, signed)" mangles as "_Z6symadaci".
It's possible that we no longer need to support that older (and ambiguous
with Ada and other languages) mangling scheme for C++, I don't know.
I wish Ada linkage names also had some kind of leading prefix, but
that can't happen without an ABI break, of course...

Thanks,
Pedro Alves



More information about the Gdb-patches mailing list