libunwind & _Unwind_Backtrace

Bryce McKinlay mckinlay@redhat.com
Wed May 18 23:00:00 GMT 2005


Steve Ellcey wrote:

>I was looking at building java on IA64 HP-UX and I found that the java
>library calls _Unwind_Backtrace().  Now the unwind interface for C++ is
>standardized and does not include this routine, apparently this was
>added for java but isn't part of any standard.
>
>The reason this affects me is that on IA64 HP-UX we are currently using
>the system libunwind and it does not include this routine.  So, to build
>java on IA64 HP-UX I have to provide this somehow.  I am looking at
>several options and would like some opinions.
>
>Create my own _Unwind_Backtrace routine separate from libunwind.  This
>should be possible using the existing system interface to libunwind,
>but where would it live then?  Could I put it in the java runtime
>library?
>

There is something of a mechanism to define your own, platform specific 
backtrace routine. Currently, this is just a minimal implementation used 
on Windows where real unwind info is unavailable. However, it could be 
extended/improved to provide a complete replacement for the gcc unwind 
functions if needed.

Note that you'll need to implement _Unwind_GetIP() and 
_Unwind_GetRegionStart() in addition to _Unwind_GetBackTrace in order to 
get full functionality.

See fallback_backtrace in stacktrace.cc, sysdep/i386/backtrace.h, and 
configure.host for some pointers.

Regards

Bryce




More information about the Java mailing list