|
ginnOS
The reference: libc, the libraries and the kernel
|
#include "backtrace.h"#include "arch/arch.h"#include "common/stdio.h"#include "kernel/klog/klog.h"#include "kernel/debug/ksyms.h"Macros | |
| #define | BT_LINE(fmt, ...) |
| #define | ADDR_HEX_DIGITS (2 * sizeof(uintptr_t)) |
Functions | |
| void | backtrace_print_pc (const char *label, uintptr_t pc) |
| print one code address as "0x0001234a func+0x1c". | |
| void | backtrace_print_return (const char *label, uintptr_t ret) |
| print one return address. | |
| void | backtrace_print (uintptr_t frame) |
| print the return addresses found by walking frame pointers from frame. | |
| #define BT_LINE | ( | fmt, | |
| ... ) |
| #define ADDR_HEX_DIGITS (2 * sizeof(uintptr_t)) |
| void backtrace_print_pc | ( | const char * | label, |
| uintptr_t | pc ) |
print one code address as "0x0001234a func+0x1c".
| label | text printed before the address (e.g. "at" or "#3"). |
| pc | the code address. |
| void backtrace_print_return | ( | const char * | label, |
| uintptr_t | ret ) |
print one return address.
like backtrace_print_pc, but the symbol is looked up for the call instruction before it (ret - 1).
| label | text printed before the address (e.g. "?"). |
| ret | the return address. |
| void backtrace_print | ( | uintptr_t | frame | ) |
print the return addresses found by walking frame pointers from frame.
stops at the first address outside kernel code (e.g. a user-mode frame).
| frame | the frame pointer to start from. |