From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5197 invoked by alias); 29 Nov 2010 16:47:09 -0000 Received: (qmail 5158 invoked by uid 22791); 29 Nov 2010 16:47:05 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,SARE_URI_CONS7 X-Spam-Check-By: sourceware.org Received: from localhost (HELO sourceware.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 29 Nov 2010 16:47:01 +0000 From: "taviso at cmpxchg8b dot com" To: gdb-prs@sourceware.org Subject: [Bug c++/12273] New: demangled symbol names unrecognised in non-debug builds X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: c++ X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: taviso at cmpxchg8b 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-Changed-Fields: Message-ID: X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Mon, 29 Nov 2010 17:29:00 -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 X-SW-Source: 2010-q4/txt/msg00181.txt.bz2 http://sourceware.org/bugzilla/show_bug.cgi?id=12273 Summary: demangled symbol names unrecognised in non-debug builds Product: gdb Version: HEAD Status: NEW Severity: normal Priority: P2 Component: c++ AssignedTo: unassigned@sourceware.org ReportedBy: taviso@cmpxchg8b.com DSOs that export mangled symbols are unrecognised in their mangled form this used to work in 7.1, but for some reason doesn't seem to work any more. I'm not sure what changed that caused it to break. You can reproduce the problem like this, create an object with an exported mangled symbol: $ cat dynsym.cc #include class GDB { public: static int whatever (void) { return fprintf(stderr, "Hello World\n"); } }; int main(int argc, char **argv) { return GDB::whatever(); } $ g++ -export-dynamic dynsym.cc -s -o dynsym Verify the symbol is present: $ nm -D dynsym | c++filt | grep GDB 00000000004008ca W GDB::whatever() Try to break on the demangled symbol name: $ gdb -q ./dynsym (gdb) b GDB::whatever() Can't find member of namespace, class, struct, or union named "GDB::whatever" Hint: try 'GDB::whatever() or 'GDB::whatever() (Note leading single quote.) Note that if I use the mangled symbol name directly, GDB accepts it. (gdb) b _ZN3GDB8whateverEv Breakpoint 1 at 0x4008ce (gdb) r Breakpoint 1, 0x00000000004008ce in GDB::whatever() () I don't think this is a problem with not recognising the symbols, as it's listed as a completion target if I try to complete on symbol names, and info address works: (gdb) info address GDB::whatever() Symbol "GDB::whatever()" is at 0x4008ca in a file compiled without debugging. This used to work, in a vanilla GDB 7.1: $ gdb dynsym GNU gdb (GDB) 7.1 (gdb) b GDB::whatever() Breakpoint 1 at 0x8048639 -- Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.