Boost logo

Boost :

From: scleary_at_[hidden]
Date: 2002-06-12 12:21:20


> From: Schalk_Cronje_at_[hidden] [mailto:Schalk_Cronje_at_[hidden]]
>
> > I'd like to have assertions that include a stack traceback. Is it
> > possible to do this portably? Does such a lib already exist?
>
> One has to do a per platform implementation. Linux uses backtrace() and
> backtrace_symbols(). Solaris uses getcontext() and dladdr(). I think for
> Win32 one has to use StackWalk, but since I have never done a Win32
> stacktrace implementation I know no more.

I've worked with Win32 stack traces with the Borland compiler. StackWalk
works fine; it's getting the symbol names that's complicated.

There are some symbol helper APIs (e.g., dbghelp.dll), but they only support
VC++. I've got an alternative solution specifically for Borland that uses
map files, similar to Jani Kajala's for VC++.

        -Steve


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk