Boost logo

Boost :

Subject: Re: [boost] [Backtrace] Any interest in portable stack trace?
From: Edd Dawson (lists_at_[hidden])
Date: 2010-10-20 18:50:34


On 10/20/2010 8:47 PM, Artyom wrote:

> How implemented:
>
> Linux/Mac/Solaris with GCC:
>
> Capture trace using backtrace
> Convert trace using dladdr + with demangling
> Requires: compilation with -rdynamic for fetching symbols
>
> Linux/Mac/Solaris with Other compilers:
>
> Capture trace using backtrace
> Convert trace using backtrace_symbols (no demangling)
> Requires: compilation with -rdynamic for fetching symbols
>
> Windows/MSVC
>
> Capture trace using RtlCaptureStackBackTrace (XP and Above)
> Convert trace using dbghelp.lib using SymFromAddr
> Requires: debug info (PDB files) for fetching symbols

I've got some code for MinGW, too. Feel free to pinch it:

http://bitbucket.org/edd/stack_trace

Some of the dependencies (supplied with a MinGW install) are GPL and LGPL,
though. I've been meaning to invest some time in to getting rid of them, but
haven't got around to it yet.

Cheers,

Edd


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