[MinGW] RFA: Make Stack Traces Work for Interpreted Code on Windows

Ranjit Mathew rmathew@gmail.com
Wed Jul 12 17:28:00 GMT 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Bryce McKinlay wrote:
> Ranjit Mathew wrote:
>>> Note that even then there are some situations (invocation API) where
>>> neither _Jv_RunMain or _Jv_ThreadStart will be on the stack.
>> ...would you happen to know what *will* be there on the call stack
>> in this case?
> 
> I don't think there is anything guaranteed in the invocation API case. 
> For JNI you could look for the various JNI Call* functions, but even 
> then it is tricky to figure out whether the frame you are looking at is 
> the outermost JNI call.

For now, I'm giving up when the unwinding reaches "close enough"
to main(). :-/


> I think you could just overload them with #defines in backtrace.h? 
> Failing that, I think that adding a couple of #ifdef's in UnwindTraceFn 
> is not as bad as the code duplication.

That worked pretty nicely, thank you. It reduces unnecessary
duplication of code too. The attached patch implements it and
was tested using a crossed-native compiler for i686-pc-mingw32.
I still get usable stack traces for compiled and interpreted
code.

OK?

Thanks,
Ranjit.

- --
Ranjit Mathew       Email: rmathew AT gmail DOT com

Bangalore, INDIA.     Web: http://rmathew.com/




-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEtTFTYb1hx2wRS48RArjrAJ9mpsgaC7uv24LxehmpwLlxxAsnXQCgkwPf
Gm3Wb/KgCNNOVqZROV14tIU=
=pJ4u
-----END PGP SIGNATURE-----
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: p3.txt
URL: <http://gcc.gnu.org/pipermail/java-patches/attachments/20060712/95f970db/attachment.txt>


More information about the Java-patches mailing list