From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9370 invoked by alias); 25 Jun 2014 20:00:29 -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 9334 invoked by uid 48); 25 Jun 2014 20:00:28 -0000 From: "tromey at redhat dot com" To: gdb-prs@sourceware.org Subject: [Bug c++/16843] GDB relies on the mangled name of a subprogram to be a prefix of the enclosing class name Date: Wed, 25 Jun 2014 20:00: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: tromey at redhat 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: cc 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: 2014-q2/txt/msg00490.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=16843 Tom Tromey changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tromey at redhat dot com --- Comment #3 from Tom Tromey --- (In reply to David Blaikie from comment #0) > If GDB doesn't rely on this assumption and can handle some differences > between naming (for example GCC always uses "long int" even though c++filt > demangles this as "long", 'x' versus (char)120, etc, etc... ) then it's just > missing a case to handle the bug reported against GCC. gdb doesn't rely on this. Instead it does name canonicalization. > In this case, "ptype f" will give a declaration of foo<1> because the > difference in mangled names (foo<'\001'> versus foo<'\x01'>) but other > examples ('long int' versus 'long') don't exhibit this problem. This is a bit curious since I was under the impression that gdb demangled the linkage name, canonicalized it, and then used that name. So, barring cases where "physname" must be computed, I thought gdb wouldn't be using the name in the debuginfo. But, no big deal, some part of my understanding must be wrong. Probably a bug in the canonicalization code. -- You are receiving this mail because: You are on the CC list for the bug.