This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug java/13743] New: Debug Info for Java breaks inferior calls


From: Jeff Johnston <jjohnstn at redhat.com>

  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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]