libdragon
backtrace_internal.h
1#ifndef __LIBDRAGON_BACKTRACE_INTERNAL_H
2#define __LIBDRAGON_BACKTRACE_INTERNAL_H
3
5typedef enum {
6 BT_FUNCTION,
7 BT_FUNCTION_FRAMEPOINTER,
8 BT_EXCEPTION,
9 BT_LEAF
10} bt_func_type;
11
13typedef struct {
14 bt_func_type type;
18} bt_func_t;
19
20bool __bt_analyze_func(bt_func_t *func, uint32_t *ptr, uint32_t func_start, bool from_exception);
21
22
41char* __symbolize(void *vaddr, char *buf, int size);
42
43#endif
bool __bt_analyze_func(bt_func_t *func, uint32_t *ptr, uint32_t func_start, bool from_exception)
Analyze a function to find out its stack frame layout and properties (useful for backtracing).
Definition: backtrace.c:380
char * __symbolize(void *vaddr, char *buf, int size)
Return the symbol associated to a given address.
Definition: backtrace.c:304
Description of a function for the purpose of backtracing (filled by __bt_analyze_func)
Definition: backtrace_internal.h:13
int stack_size
Size of the stack frame.
Definition: backtrace_internal.h:15
int ra_offset
Offset of the return address from the top of the stack frame.
Definition: backtrace_internal.h:16
int fp_offset
Offset of the saved fp from the top of the stack frame; this is != 0 only if the function modifies fp...
Definition: backtrace_internal.h:17
bt_func_type type
Type of the function.
Definition: backtrace_internal.h:14