Function esp_idf_sys::esp_backtrace_get_next_frame

source ยท
pub unsafe extern "C" fn esp_backtrace_get_next_frame(
    frame: *mut esp_backtrace_frame_t,
) -> bool
Expand description

Get the next frame on a stack for backtracing

Given a stack frame(i), this function will obtain the next stack frame(i-1) on the same call stack (i.e. the caller of frame(i)). This function is meant to be called iteratively when doing a backtrace.

Entry Conditions: Frame structure containing valid SP and next_pc Exit Conditions:

  • Frame structure updated with SP and PC of frame(i-1). next_pc now points to frame(i-2).
  • If a next_pc of 0 is returned, it indicates that frame(i-1) is last frame on the stack

@param[inout] frame Pointer to frame structure

@return

  • True if the SP and PC of the next frame(i-1) are sane
  • False otherwise