From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24140 invoked by alias); 19 Jan 2004 17:16:46 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 24108 invoked by uid 48); 19 Jan 2004 17:16:45 -0000 Date: Mon, 19 Jan 2004 17:16:00 -0000 From: "aph at gcc dot gnu dot org" To: gcc-bugs@gcc.gnu.org Message-ID: <20040119171639.13743.aph@gcc.gnu.org> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug java/13743] New: Debug Info for Java breaks inferior calls X-Bugzilla-Reason: CC X-SW-Source: 2004-01/txt/msg02227.txt.bz2 List-Id: From: Jeff Johnston In doing some more testing with java inferior call, I found a key difference between the java and C++ debug info files that is causing gdb some grief. We can't make inferior calls to non-static java members as we can't find the vtable. In C++, the vtable is being represented by a special member called _vptr.class. In the DW_AT_structure_type for the class, it has a special DW_AT_containing_type tag which points to the class that contains this _vptr member. In this case, Property has the _vptr entry so it points to itself. Gdb is specifically looking for this _vptr entry and if it can't find it, gives up trying to resolve a virtual member function. In java, the DW_AT_containing_type tag is missing from the DW_AT_structure_type and there isn't a _vptr member entry. I did find a vtable member in java.lang.Object but I don't know if that is the same. It might be possible just to point the containing_type to the java.lang.Object and then have gdb understand and use the vtable entry. Any thoughts? We're kind of in unchartered ground here. I have included a better C++ example for you to look at with the debug info from readelf -wi. The member function dothat() in the Property class is comparable from java to C++. -- Summary: Debug Info for Java breaks inferior calls Product: gcc Version: 3.4.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: java AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: aph at gcc dot gnu dot org CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13743