Skip to content

Repository files navigation

Eggs.Stacktrace

Eggs.Stacktrace is a stacktrace library.

Requirements

  • 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+)

Building

cmake --preset dev-gcc -B build/dev-gcc
cmake --build build/dev-gcc --config Debug
ctest --test-dir build/dev-gcc --build-config Debug

Replace dev-gcc with dev-clang, dev-clang-libcxx, or dev-msvc as appropriate.

Backends

TargetPlatformDescription
Eggs::Stacktrace::NullAllEmpty capture; always available
Eggs::Stacktrace::ExecinfoPOSIX(planned)backtrace() + dladdr() symbolization
Eggs::Stacktrace::LibbacktraceLinux(planned) Full source file and line info via libbacktrace
Eggs::Stacktrace::Win32Windows(planned)CaptureStackBackTrace + DbgHelp

Eggs::Stacktrace aliases the best available backend on the current platform.

Usage

#include<eggs/stacktrace.hpp>
#include<iostream>voidfoo()
{
auto st = eggs::stacktrace::current();
std::cout << st;
}

CMake Integration

find_package(Eggs.StacktraceREQUIRED)
target_link_libraries(my_targetPRIVATEEggs::Stacktrace)

License

Distributed under the Boost Software License, Version 1.0.

About

Eggs.Stacktrace is a C++ stacktrace library

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages