This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java 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] | |
Hi.
I've revised the interpreter I wrote for DWARF-2 .debug_line byte
codes, which can be used in place of 'addr2line' to determine the
source file and line number of stack frames. This one contains no
native code whatsoever, and should be easy to extend to other binary
formats (this implementation only deals with 32-bit ELF files). It is
also much simpler, since it doesn't need to figure out which library
file to open on its own.
I will note that it is not faster than addr2line, when run from the
shell (startup time might account for this), but it seems to run at
least comparatively well (I haven't compared it against running
addr2line when looking up a real stack trace). It does seem as though
GCJ's MappedByteBuffer is slower than the one IBM's JRE uses, and this
code exercises that class well.
I haven't yet updated the build infrastructure or the Throwable
classes to use this. What needs to be done now is
- Include the new classes in libjava/Makefile.am.
- Update configure.ac to symlink the appropriate section finder
class to 'SectionFinder.java'. Here I used the same way I remember
things like 'ConcreteProcess' being done: you symlink the
platform-specific source class to its real source location.
- Update the debug stack trace code to use this. Probably calling it
from 'NameFinder' is easiest.
Byte order problems probably exist, and it does suck that the section
lookup class is only 32-bit.
Thanks!
2005-03-20 Casey Marshall <csm@gnu.org>
* gnu/gcj/runtime/Dwarf2NameFinder.java: new file.
* gnu/gcj/runtime/SectionFinderELF32.java: new file.
* gnu/gcj/runtime/SectionFinderUnknown.java: new file.
--
Casey Marshall || csm@gnu.org
Attachment:
Dwarf2NameFinder.java
Description: Text document
Attachment:
SectionFinderELF32.java
Description: Text document
Attachment:
SectionFinderUnknown.java
Description: Text document
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |