Eggs.Stacktrace is a stacktrace library.
- CMake 4.0+ to build from source; CMake 3.21+ to consume an installed package via
find_package - A C++11 compiler (GCC 11+, Clang 17+, MSVC 2022+)
cmake --preset dev-gcc -B build/dev-gcc
cmake --build build/dev-gcc --config Debug
ctest --test-dir build/dev-gcc --build-config DebugReplace dev-gcc with dev-clang, dev-clang-libcxx, or dev-msvc as appropriate.
| Target | Platform | Description |
|---|---|---|
Eggs::Stacktrace::Null |
All | Empty capture; always available |
Eggs::Stacktrace::Execinfo |
POSIX | (planned) backtrace() + dladdr() symbolization |
Eggs::Stacktrace::Libbacktrace |
Linux | (planned) Full source file and line info via libbacktrace |
Eggs::Stacktrace::Win32 |
Windows | (planned) CaptureStackBackTrace + DbgHelp |
Eggs::Stacktrace aliases the best available backend on the current platform.
#include <eggs/stacktrace.hpp>
#include <iostream>
void foo()
{
auto st = eggs::stacktrace::current();
std::cout << st;
}find_package(Eggs.Stacktrace REQUIRED)
target_link_libraries(my_target PRIVATE Eggs::Stacktrace)Distributed under the Boost Software License, Version 1.0.