[PATCH] DWARF-2 .debug_line reader

Casey Marshall csm@gnu.org
Mon Jul 26 19:26:00 GMT 2004


Hi,

This is a follow-up to my previous post about reading the ELF
.debug_line section in GCJ-compiled libraries to determine the file
name and line number of debug stack frames. It improves the
performance greatly, by mapping any needed .debug_line sections into
memory, and cacheing ranges of PC addresses to a compilation unit
inside a debug section. I have also rewritten the bits I got from
elsewhere.

This patch doesn't modify the VMThrowable or NameFinder classes to use
this, since the DWARF-2 reader only handles file names and line
numbers, not classes and method names, which the existing
implementation needs. Hopefully, this will fit better into future
revisions of the throwable/stack trace implementation.

The look-up appears to be correct, for the most part. For some reason,
the line numbers I get for FirstThread are incorrect, but I don't know
why yet.

2004-07-24  Casey Marshall <csm@gnu.org>

	* configure.in: look for link.h.
	* Makefile.am: add new files.
	* Makefile.in: regenerated.
	* gnu/gcj/runtime/AddressMap.java,
	* gnu/gcj/runtime/AddressRange.java,
	* gnu/gcj/runtime/DebugInfo.java,
	* gnu/gcj/runtime/Dwarf2NameFinder.java,
	* gnu/gcj/runtime/natAddressRange.cc,
	* gnu/gcj/runtime/natDwarf2NameFinder.cc: new files.

-- 
Casey Marshall || csm@gnu.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dw2.patch
Type: text/x-patch
Size: 40247 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/java-patches/attachments/20040726/0d1eded5/attachment.bin>


More information about the Java-patches mailing list