Debugging
include/dbg.h View source View on GitHubFunctions
Section titled “Functions”debug_print_registers
Section titled “debug_print_registers”void debug_print_registers(); debug_print_stack
Section titled “debug_print_stack”void debug_print_stack(); debug_print_memory
Section titled “debug_print_memory”void debug_print_memory(void *addr, size_t size); debug_print_stack_from
Section titled “debug_print_stack_from”void debug_print_stack_from(uint64_t *start, size_t max_scan); stack_unwind
Section titled “stack_unwind”size_t stack_unwind(uint64_t frame, uint64_t *entries, size_t max); debug_print_stack_trace
Section titled “debug_print_stack_trace”void debug_print_stack_trace(const uint64_t *entries, size_t nr); debug_symbolize
Section titled “debug_symbolize”const char * debug_symbolize(uint64_t addr, uint64_t *out_off); debug_line_for
Section titled “debug_line_for”const char * debug_line_for(uint64_t addr, uint32_t *out_line); debug_syms_present
Section titled “debug_syms_present”bool debug_syms_present(void); Macros
Section titled “Macros”STACK_TRACE_MAX_DEPTH
Section titled “STACK_TRACE_MAX_DEPTH”#define STACK_TRACE_MAX_DEPTH 64 stack_trace_save
Section titled “stack_trace_save”#define stack_trace_save(entries, max) \
stack_unwind((uint64_t) __builtin_frame_address(0), (entries), (max))