1 #ifndef __LUNAIX_TRACE_H
2 #define __LUNAIX_TRACE_H
4 #include <lunaix/boot_generic.h>
5 #include <sys/interrupts.h>
23 struct ksym_entry syms[0];
28 struct ksyms* ksym_table;
32 * @brief Init the trace service using loaded modksyms module
37 trace_modksyms_init(struct boot_handoff* bhctx);
40 * @brief Locate the symbol which is the closest to given pc.
43 * @return struct ksym_entry*
46 trace_sym_lookup(ptr_t pc);
49 * @brief Walk the stack backwards to generate stack trace
58 trace_walkback(struct trace_record* tb_buffer,
64 * @brief Print the stack trace starting from the given frame pointer
69 trace_printstack_of(ptr_t fp);
72 * @brief Print the stack trace given the current interrupt context. In addition
73 * to the stacktrace, this will also print all context switches happened
74 * beforehand, and all stack trace in each context. Recommended for verbose
80 trace_printstack_isr(const isr_param* isrm);
83 * @brief Print the stack trace starting from caller's frame pointer.
89 #endif /* __LUNAIX_TRACE_H */