Wrestling with exceptions on win32 gcj 4.1

Andrew Haley aph@redhat.com
Fri Apr 7 14:12:00 GMT 2006


Ranjit Mathew writes:
 > -----BEGIN PGP SIGNED MESSAGE-----
 > Hash: SHA1
 > 
 > Darius wrote:
 > > 
 > > Is there any way to fill start_ip with correct method start address
 > > using SJLJ exceptions?
 > 
 > I don't know about that, but addr2line used to be used for
 > printing source line numbers from IPs in stack traces. c++-filt
 > was used for printing out demangled names for Java classes
 > and methods. So there might still be a way of doing this
 > for stack traces at least, but probably not for the security
 > infrastructure.

The most recent unwinder could be adapted for SJLJ execption handling.
The code in GetStackTraceElements bracketed with ifdef SJLJ_EXCEPTIONS
could use dladdr() to fill in the start address of each method.  Given
that, _Jv_StackTrace::ClassForFrame will find the class.  This does
require a working dladdr(), though.

 > However, I still maintain that someone should put in the
 > effort to move Windows over to DWARF-2 EH instead of
 > SJLJ.

Yes.

Andrew.



More information about the Java mailing list