1 #ifndef __LUNAIX_TRACE_H
2 #define __LUNAIX_TRACE_H
4 #include <lunaix/boot_generic.h>
5 #include <lunaix/pcontext.h>
24 struct ksym_entry syms[0];
29 struct ksyms* ksym_table;
33 * @brief Init the trace service using loaded modksyms module
38 trace_modksyms_init(struct boot_handoff* bhctx);
41 * @brief Locate the symbol which is the closest to given pc.
44 * @return struct ksym_entry*
47 trace_sym_lookup(ptr_t pc);
50 * @brief Walk the stack backwards to generate stack trace
59 trace_walkback(struct trace_record* tb_buffer,
65 * @brief Print the stack trace starting from the given frame pointer
70 trace_printstack_of(ptr_t fp);
73 * @brief Print the stack trace given the current interrupt context. In addition
74 * to the stacktrace, this will also print all context switches happened
75 * beforehand, and all stack trace in each context. Recommended for verbose
81 trace_printstack_isr(const isr_param* isrm);
84 * @brief Print the stack trace starting from caller's frame pointer.
90 #endif /* __LUNAIX_TRACE_H */