Go to the source code of this file.
Data Structures | |
struct | Symbol |
struct | SymbolTable |
Macros | |
#define | SYMBOL_TABLE_PTR_ROM_ADDR 0x18 |
ROM address of the pointer to the symbol table. | |
Functions | |
int | backtrace (void **buffer, int size) |
Walk the stack and return the current call stack. | |
int | backtrace_thread (void **buffer, int size, OSThread *thread) |
void | debug_backtrace (void) |
Print a backtrace. | |
void | backtrace_address_to_string (u32 address, char *dest) |
Converts a function address to a string representation using its name, offset, and file. | |
struct Symbol |
struct SymbolTable |
Data Fields | ||
---|---|---|
char | magic[4] | |
u32 | symbolCount | |
struct Symbol | symbols[0] |
#define SYMBOL_TABLE_PTR_ROM_ADDR 0x18 |
ROM address of the pointer to the symbol table.
This particular location is an unused part of the header lol. Don't modify this without also updating append_symbol_table.py.
Definition at line 12 of file backtrace.h.
Referenced by address2symbol().
int backtrace | ( | void ** | buffer, |
int | size ) |
Walk the stack and return the current call stack.
This function will analyze the current execution context, walking the stack and returning informations on the active call frames.
This function adheres to POSIX specification. It does not allocate memory so it is safe to be called even in the context of low memory conditions or possibly corrupted heap.
If called within an interrupt or exception handler, the function is able to correctly walk backward the interrupt handler and show the context even before the exception was triggered.
buffer | Empty array of pointers. This will be populated with pointers to the return addresses for each call frame. |
size | Size of the buffer, that is, maximum number of call frames that will be walked by the function. |
Definition at line 298 of file backtrace.c.
Referenced by debug_backtrace().
int backtrace_thread | ( | void ** | buffer, |
int | size, | ||
OSThread * | thread ) |
Definition at line 308 of file backtrace.c.
Referenced by crash_screen_draw().
void debug_backtrace | ( | void | ) |
Print a backtrace.
Definition at line 423 of file backtrace.c.
void backtrace_address_to_string | ( | u32 | address, |
char * | dest ) |
Converts a function address to a string representation using its name, offset, and file.
Definition at line 396 of file backtrace.c.
Referenced by crash_screen_draw(), and debug_backtrace().