KallistiOS git master
Independent SDK for the Sega Dreamcast
Loading...
Searching...
No Matches
Stack Traces

API for managing stack backtracing. More...

Files

file  stack.h
 Stack traces.
 

Functions

void arch_stk_trace (int n)
 Do a stack trace from the current function.
 
void arch_stk_trace_at (uint32 fp, int n)
 Do a stack trace from the current function.
 

Detailed Description

API for managing stack backtracing.

Function Documentation

◆ arch_stk_trace()

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().

Parameters
nThe number of frames to leave off. Each frame is a jump to subroutine or branch to subroutine. assert() leaves off 2 frames, for reference.

◆ arch_stk_trace_at()

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.

Parameters
fpThe frame pointer to start from.
nThe number of frames to leave off.