This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/15801] some C++11 symbols can't be demangled


http://sourceware.org/bugzilla/show_bug.cgi?id=15801

--- Comment #2 from Ben Longbons <b.r.longbons at gmail dot com> ---
I didn't realize you had to (gdb) set lang c++
I recommend a warning; I did not expect this from (gdb) help maint demangle

There *is*, however, still the bug that originally lead me on this hunt:

A previous version of gcc (4.6) mangled symbols wrong (I instead of J for
packs; I did read the mangling ABI spec), so (for bugward ABI compatibility)
recent versions of gcc (4.7, 4.8) emit two symbols pointing to the same
address.

I don't know if there actually remains enough information to consistently pick
the right one, unless you do a hacky heuristic like "if there is more than one
symbol for an address, prefer the one with more Js and less Is".

Oddly, however, c++filt 2.23 sometimes manages to demangle even the incorrect
mangling. But gdb sometimes gives up and sometimes produces a totally bogus
demangling (c++filt does not do this).

The exact details of this problem are hard to investigate because of bug 12707
... it sometimes makes a difference whether debug symbols are on or off. I'll
make an attachment with some further commentary.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]