esp_backtrace_print() function
Print the backtrace of the current stack
Arguments
depth
The maximum number of stack frames to print (should be > 0)
Return value
- ESP_OK Backtrace successfully printed to completion or to depth limit - ESP_FAIL Backtrace is corrupted
Notes
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.
esp_backtrace_print() is called by 2 functions and calls 2 functions:
![]()
esp_backtrace_print()
esp_backtrace_print() reads 3 variables:
![]()
esp_backtrace_print()