Skip to content
mhahnFr edited this page Oct 10, 2022 · 25 revisions

Here you can find all informations about the CallstackLibrary as well as the documentation of the source code.

The features

This library can translate backtraces obtained by the function backtrace into a human readable format. It will use the debug symbols of the application, in case they are not available, the informations obtained by the dynamic linker are used.
Additionally, the name demangler for C++ names can be enabled.

How to use

Example:

#include <callstack.h>

#include <stdio.h>

int main() {
    struct callstack * callstack = callstack_new();
    char ** frames = callstack_toArray(callstack);
    
    printf("The current callstack:\n");
    for (size_t i = 0; i < callstack_getFrameCount(); ++i) {
        printf("In: %s\n", frames[i]);
    }
    
    callstack_delete(callstack);
}
Clone this wiki locally