PATCH: new DWARF-2 reader

Andrew Haley aph@redhat.com
Fri Apr 1 10:41:00 GMT 2005


Casey Marshall writes:
 > >>>>> "Casey" == Casey Marshall <csm@gnu.org> writes:
 > 
 > Revised again, fixing a few remaining problems with the implementation
 > (the DWARF-2 spec is really hard to interpret! I hope now that it is
 > accurate) and fit it into the Throwable machinery.
 > 
 > 2005-03-26  Casey Marshall  <csm@gnu.org>
 > 
 > 	* gnu/gcj/runtime/NameFinder.java (use_dwarf2): new constant.
 >         (<clinit>): new method, fill in boolean config variables with
 >         GetPropertyAction.
 >         (dwarf2finders): new field.
 >         (lookup): try DWARF-2 finder before addr2line.
 >         * gnu/gcj/runtime/Dwarf2NameFinder.java: new file.
 >         * gnu/gcj/runtime/SectionFinderELF32.java: new file.
 >         * gnu/gcj/runtime/SectionFinderUnknown.java: new file.
 >         * Makefile.am (built_java_source_files): add
 >         'SectionFinder.java'
 >         (ordinary_java_source_files): add 'Dwarf2NameFinder.java'
 >         (configure.ac): link the appropriate SectionFinder class to
 >         SectionFinder.java

Thanks.

I think we should go with this, at least for the time being.  However,
at a minimum, it needs first to be tested on 32- and 64-bit systems,
big- and little-endian.  We should be able to co-operate to do this.

There is a rival proposal that we use elfutils to do the reading.  At
the present time elfutils is licensed under the OSL (Open Software
License) and not assigned to the FSF.  And, acording to
http://people.redhat.com/drepper/, the DWARF library is currently
being reworked.

In the long term I don't think it makes a huge amount of sense for
libgcj to have a private DWARF reader -- it'll have its own bugs, and
will need to be maintained.  However, it is a real advantage for us to
have this code now, so I think it should go in.

Andrew.



More information about the Java-patches mailing list