This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
backtrace() vs. _Unwind_Backtrace()
- From: Andrew Haley <aph at redhat dot com>
- To: David Mosberger <davidm at napali dot hpl dot hp dot com>
- Cc: java at gcc dot gnu dot org
- Date: Fri, 5 Dec 2003 10:46:47 +0000
- Subject: backtrace() vs. _Unwind_Backtrace()
- References: <200312050134.hB51YKEu021840@napali.hpl.hp.com>
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.