KallistiOS
##version##
|
Stack traces. More...
Go to the source code of this file.
Functions | |
void | arch_stk_trace (int n) |
Do a stack trace from the current function. More... | |
void | arch_stk_trace_at (uint32 fp, int n) |
Do a stack trace from the current function. More... | |
Stack traces.
The functions in this file deal with doing stack traces. These functions will do a stack trace, as specified, printing it out to stdout (usually a dcload terminal). These functions only work if frame pointers have been enabled at compile time (-DFRAME_POINTERS and no -fomit-frame-pointer flag).
void arch_stk_trace | ( | int | n | ) |
Do a stack trace from the current function.
This function does a stack trace from the current function, printing the results to stdout. This is used, for instance, when an assertion fails in assert().
n | The number of frames to leave off. Each frame is a jump to subroutine or branch to subroutine. assert() leaves off 2 frames, for reference. |
void arch_stk_trace_at | ( | uint32 | fp, |
int | n | ||
) |
Do a stack trace from the current function.
This function does a stack trace from the the specified frame pointer, printing the results to stdout. This could be used for doing something like stack tracing a main thread from inside an IRQ handler.
fp | The frame pointer to start from. |
n | The number of frames to leave off. |