The idea here is to have a unified library for stacktraces. It now defaults to libbacktrace` as the actual stacktrace implemntation.
| Release Version | Release Notes | AI Documentation |
|---|---|---|
| RELEASENOTES | DeepWiki for mulle-stacktrace |
mulle_stacktrace_once( fp) - Print current stacktrace to file pointer mulle_stacktrace( stacktrace, fp) - Print with custom stacktrace configuration _mulle_stacktrace( stacktrace, offset, format, fp) - Full control with format options
| Option | Description |
|---|---|
mulle_stacktrace_normal |
Full stacktrace |
mulle_stacktrace_trimmed |
Remove system frames (default) |
mulle_stacktrace_linefeed |
One frame per line |
mulle_stacktrace_csv |
CSV format |
#include <mulle-stacktrace/mulle-stacktrace.h>
void foo()
{
// Simple usage - print trimmed stacktrace
mulle_stacktrace_once( stdout);
// Full control - print with linefeeds, skip 1 frame
_mulle_stacktrace( NULL, 1, mulle_stacktrace_linefeed, stdout);
}This project is a component of the mulle-core library. As such you usually will not add or install it
individually, unless you specifically do not want to link against
mulle-core.
Use mulle-sde to add mulle-stacktrace to your project:
mulle-sde add github:mulle-core/mulle-stacktraceTo only add the sources of mulle-stacktrace with dependency sources use clib:
clib install --out src/mulle-core mulle-core/mulle-stacktraceAdd -isystem src/mulle-core to your CFLAGS and compile all the sources that were downloaded with your project.
Use mulle-sde to build and install mulle-stacktrace and all dependencies:
mulle-sde install --prefix /usr/local \
https://github.com/mulle-core/mulle-stacktrace/archive/latest.tar.gzInstall the requirements:
| Requirements | Description |
|---|---|
| mulle-dlfcn | ♿️ Shared library helper |
| libbacktrace | A C library that may be linked into a C/C++ program to produce symbolic backtraces |
Download the latest tar or zip archive and unpack it.
Install mulle-stacktrace into /usr/local with cmake:
PREFIX_DIR="/usr/local"
cmake -B build \
-DMULLE_SDK_PATH="${PREFIX_DIR}" \
-DCMAKE_INSTALL_PREFIX="${PREFIX_DIR}" \
-DCMAKE_PREFIX_PATH="${PREFIX_DIR}" \
-DCMAKE_BUILD_TYPE=Release &&
cmake --build build --config Release &&
cmake --install build --config ReleaseNat! for Mulle kybernetiK