Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
backtrace.h
Go to the documentation of this file.
1#ifndef BACKTRACE_H
2#define BACKTRACE_H
3
4#include "common.h"
5
12#define SYMBOL_TABLE_PTR_ROM_ADDR 0x18
13
14typedef struct Symbol {
15 u32 address;
18} Symbol;
19
20typedef struct SymbolTable {
21 char magic[4]; // "SYMS"
23 struct Symbol symbols[0];
24 // then lots of strings
26
48int backtrace(void **buffer, int size);
49
50int backtrace_thread(void **buffer, int size, OSThread *thread);
51
53void debug_backtrace(void);
54
56void backtrace_address_to_string(u32 address, char* dest);
57
58#endif
u32 fileOffset
Offset of the file name and line string.
Definition backtrace.h:17
int backtrace(void **buffer, int size)
Walk the stack and return the current call stack.
Definition backtrace.c:298
u32 address
RAM address.
Definition backtrace.h:15
void debug_backtrace(void)
Print a backtrace.
Definition backtrace.c:423
int backtrace_thread(void **buffer, int size, OSThread *thread)
Definition backtrace.c:308
void backtrace_address_to_string(u32 address, char *dest)
Converts a function address to a string representation using its name, offset, and file.
Definition backtrace.c:396
u32 nameOffset
Offset of the symbol name string.
Definition backtrace.h:16
struct Symbol symbols[0]
Definition backtrace.h:23
char magic[4]
Definition backtrace.h:21
u32 symbolCount
Definition backtrace.h:22