From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22566 invoked by alias); 30 Jul 2013 05:04:44 -0000 Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org Received: (qmail 22527 invoked by uid 48); 30 Jul 2013 05:04:44 -0000 From: "b.r.longbons at gmail dot com" 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 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: c++ X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: b.r.longbons at gmail dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-q3/txt/msg00125.txt.bz2 http://sourceware.org/bugzilla/show_bug.cgi?id=15801 --- Comment #2 from Ben Longbons --- 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.