There's more...
A Boost.Stacktrace library has a very neat feature for big projects. You can disable all the tracing while linking your program. It means that you do not need to rebuild all your source files. Just define BOOST_STACKTRACE_LINK macro for a whole project. Now, if you link with the boost_stacktrace_noop library, empty traces will be collected. Link with boost_stacktrace_windbg/boost_stacktrace_windbg_cached/boost_stacktrace_backtrace/ ... libraries to get traces of different readability.
Boost.Stacktrace is a new library; it appeared in Boost in 1.65.
boost::stacktrace::stacktrace collects current call sequences pretty fast; it just dynamically allocates a chunk of memory and copies a bunch of addresses into it. Decoding addresses ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access