backtrace() vs. _Unwind_Backtrace()
Andrew Haley
aph@redhat.com
Fri Dec 5 12:25:00 GMT 2003
David Mosberger writes:
> While debugging another problem, I noticed that libjava currently
> attempts to use libc's backtrace() function to create a stack trace
> (libjava/gnu/gcj/runtime/natStackTrace.cc). Recently, libgcc got an
> _Unwind_Backtrace() function, which I think should do exactly what's
> needed there (in combination with _Unwind_GetIP()), so I think it
> would make sense to switch to _Unwind_Backtrace() instead.
Java uses backtrace() a lot, and _Unwind_Backtrace() is inefficient.
I see no good reason to switch unless backtrace() doesn't work on a
given target.
Andrew.
More information about the Java
mailing list