[haiku-commits] Re: haiku: hrev49020 - src/system/libroot/posix/malloc_debug src/system/kernel src/system/kernel/debug headers/private/system headers/private/kernel

  • From: Adrien Destugues <pulkomandy@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sat, 11 Apr 2015 20:28:10 +0200

On Sat, Apr 11, 2015 at 07:40:51PM +0200, Paweł Dziepak wrote:

As already stated in the reply to Axel, this was introduced mostly due to
convenience. To my knowledge there is no way to get a stack trace in
userland that is ready to use in this situation.


There is a GCC bultin _builtin_frame_address() that libunwind uses to
handle exceptions, I guess it is not available in GCC2 but you probably can
achieve the same using the content of ebp.

We already have a recipe and package for libexecinfo which implements
backtrace() and backtrace_info(). It is used by several ports which want
to provide a backtrace on crashes (including webkit in debug mode).

--
Adrien.

Other related posts: