init_backtrace_with_backtrace()

init_backtrace_with_backtrace()#

Initializes the backtrace system for capturing stack traces using the backtrace library. This function sets up the backtrace state for later use in debugging.

Prototype

int init_backtrace_with_backtrace(
    const char *program
);

Parameters

Key

Type

Description

program

const char *

The name of the program, used to initialize the backtrace state.


Return Value

Returns 0 on success, or -1 if the backtrace state could not be created.

Notes

This function should be called early in the program execution to enable stack trace capturing. It is only available when CONFIG_DEBUG_WITH_BACKTRACE is enabled.

Prototype

// Not applicable in JS

Prototype

# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples