Function esp_idf_svc::sys::esp_backtrace_print

source ยท
pub unsafe extern "C" fn esp_backtrace_print(depth: i32) -> i32
Expand description

@brief Print the backtrace of the current stack

@param depth The maximum number of stack frames to print (should be > 0)

@note On RISC-V targets printing backtrace at run-time is only available if CONFIG_ESP_SYSTEM_USE_EH_FRAME is selected. Otherwise we simply print a register dump. Function assumes it is called in a context where the calling task will not migrate to another core, e.g. interrupts disabled/panic handler.

@return - ESP_OK Backtrace successfully printed to completion or to depth limit - ESP_FAIL Backtrace is corrupted