libdragon
Loading...
Searching...
No Matches
backtrace_internal.h
Go to the documentation of this file.
1
5#ifndef __LIBDRAGON_BACKTRACE_INTERNAL_H
6#define __LIBDRAGON_BACKTRACE_INTERNAL_H
7
15
23
24bool __bt_analyze_func(bt_func_t *func, uint32_t *ptr, uint32_t func_start, bool from_exception);
25
27int __backtrace_from(void **buffer, int size, uint32_t *pc, uint32_t *sp, uint32_t *fp, uint32_t *exception_ra);
28
47char* __symbolize(void *vaddr, char *buf, int size);
48
49#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:418
int stack_size
Size of the stack frame.
Definition backtrace_internal.h:19
int ra_offset
Offset of the return address from the top of the stack frame.
Definition backtrace_internal.h:20
int __backtrace_from(void **buffer, int size, uint32_t *pc, uint32_t *sp, uint32_t *fp, uint32_t *exception_ra)
Like backtrace, but start from an arbitrary context. Useful for backtracing a thread.
Definition backtrace.c:650
bt_func_type
The "type" of funciton as categorized by the backtrace heuristic (__bt_analyze_func)
Definition backtrace_internal.h:9
@ BT_FUNCTION_FRAMEPOINTER
The function uses the register fp as frame pointer (normally, this happens only when the function use...
Definition backtrace_internal.h:11
@ BT_LEAF
Leaf function (no calls), no stack frame allocated, sp/ra not modified.
Definition backtrace_internal.h:13
@ BT_EXCEPTION
This is an exception handler (inthandler.S)
Definition backtrace_internal.h:12
@ BT_FUNCTION
Regular function with a stack frame.
Definition backtrace_internal.h:10
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:21
bt_func_type type
Type of the function.
Definition backtrace_internal.h:18
char * __symbolize(void *vaddr, char *buf, int size)
Return the symbol associated to a given address.
Definition backtrace.c:342
Description of a function for the purpose of backtracing (filled by __bt_analyze_func)
Definition backtrace_internal.h:17