From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 128827 invoked by alias); 23 Mar 2015 04:59: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 128804 invoked by uid 48); 23 Mar 2015 04:59:43 -0000 From: "xdje42 at gmail dot com" To: gdb-prs@sourceware.org Subject: [Bug java/18153] New: Java minsyms get demangled as c++ Date: Mon, 23 Mar 2015 10:52:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: java X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: xdje42 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter Message-ID: 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: 2015-q1/txt/msg00473.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=18153 Bug ID: 18153 Summary: Java minsyms get demangled as c++ Product: gdb Version: HEAD Status: NEW Severity: normal Priority: P2 Component: java Assignee: unassigned at sourceware dot org Reporter: xdje42 at gmail dot com make check RUNTESTFLAGS=jmain.exp gdb testsuite/gdb.java/jmain (gdb) b jmain.jmain (gdb) b jmain::main The "b jmain::jmain" works because the corresponding minsym got demangled as c++. This also means that LOC_UNRESOLVED is (I think, still have to verify it) broken for Java. LOC_UNRESOLVED does minsym lookup based on the demangled name derived from DWARF, but in DWARF we know we have Java. So I'm guessing a LOC_UNRESOLVED minsym lookup for "foo.bar" will fail because the minsym got demangled as "foo::bar". Note: The code to process LOC_UNRESOLVED is in findvar.c: memset (&lookup_data, 0, sizeof (lookup_data)); lookup_data.name = SYMBOL_LINKAGE_NAME (var); Heads up when you read this: SYMBOL_LINKAGE_NAME here is actually the demangled name. I have a significant rework of minsym support in progress. Hopefully I can address this with this patch. To fix LOC_UNRESOLVED I think what we really need to do is do the minsym lookup using the mangled name. That's the topic of another patch in progress. -- You are receiving this mail because: You are on the CC list for the bug.