dbg: map addresses to file+function+offset

Add support for mapping kernel .text addresses into file + function +
offset for debugging purposes. Make the backtrace use this new feature.
This commit is contained in:
Matheus
2026-10-09 01:46:15 -03:00
parent b52882f3f7
commit ac6addd527
3 changed files with 60 additions and 1 deletions
+7 -1
View File
@@ -4,11 +4,17 @@
#include <printf.h>
#include <kernel/interrupt.h>
#include <arch/backtrace.h>
#include <dbg.h>
static bool paniced = false;
static bool step_backtrace(void *, void *ip) {
printf("%p\n", ip);
char *fn, *file;
size_t off;
dbg_get_symbol(ip, &fn, &file, &off);
printf("%p: %s:%s+%x\n", ip, file, fn, off);
return true;
}