StackTracer: add a trace_with_ip that prints the symbol name of the saved instruction pointer, for use in interrupts

This commit is contained in:
apio 2022-09-21 21:00:15 +02:00
parent 3a69551dcc
commit 1b3b93d8bb

View File

@ -27,4 +27,12 @@ void StackTracer::trace()
printf("%lx: %s\n", frame->instruction, symbol_name);
frame = frame->next;
}
}
void StackTracer::trace_with_ip(uintptr_t ip)
{
char symbol_name[512];
get_symbol_name(ip, symbol_name);
printf("%lx: %s\n", ip, symbol_name);
trace();
}