mirror of
https://github.com/boostorg/stacktrace.git
synced 2026-07-23 13:54:11 +00:00
f966b6a1e6
- Introduce `boost.stacktrace_dump` module for safe_dump interface - Introduce `boost.stacktrace_<backend>` module for each unwind/collect implementation method - Introduce `boost.stacktrace` module exposing best available backend implementation Also many tests was added for checking all available backend build and also header only library version Moreover, there are some checks for `Boost::stacktrace_<backend>` and `Boost::stacktrace_from_exception` compatibility --------- Co-authored-by: Fedor Osetrov <fdr400@Fedors-MacBook-Pro.local>
35 lines
589 B
C++
35 lines
589 B
C++
// Copyright Antony Polukhin, 2025-2026.
|
|
// Copyright Fedor Osetrov, 2025-2026.
|
|
//
|
|
// Distributed under the Boost Software License, Version 1.0. (See
|
|
// accompanying file LICENSE_1_0.txt or copy at
|
|
// http://www.boost.org/LICENSE_1_0.txt)
|
|
|
|
#include <iostream>
|
|
#include <boost/config.hpp>
|
|
|
|
#if defined(STACKTRACE_MODULE)
|
|
import STACKTRACE_MODULE;
|
|
#else
|
|
import boost.stacktrace;
|
|
#endif
|
|
|
|
namespace {
|
|
|
|
BOOST_NOINLINE void foo() {
|
|
auto trace = boost::stacktrace::stacktrace{};
|
|
std::cerr << trace;
|
|
}
|
|
|
|
BOOST_NOINLINE void bar() {
|
|
foo();
|
|
}
|
|
|
|
}
|
|
|
|
int main() {
|
|
bar();
|
|
|
|
return 0;
|
|
}
|