public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "b.r.longbons at gmail dot com" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug c++/15801] some C++11 symbols can't be demangled
Date: Tue, 30 Jul 2013 05:04:00 -0000	[thread overview]
Message-ID: <bug-15801-4717-MYSf0uOLym@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-15801-4717@http.sourceware.org/bugzilla/>

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.


  parent reply	other threads:[~2013-07-30  5:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-30  1:06 [Bug c++/15801] New: " b.r.longbons at gmail dot com
2013-07-30  1:46 ` [Bug c++/15801] " keiths at redhat dot com
2013-07-30  5:04 ` b.r.longbons at gmail dot com [this message]
2013-07-30  5:57 ` b.r.longbons at gmail dot com
2013-08-01  5:53 ` b.r.longbons at gmail dot com
2022-12-23 19:20 ` tromey at sourceware dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-15801-4717-MYSf0uOLym@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).