fix (panic): added check if the current symbol was found by the resolver
This commit is contained in:
parent
bde9d6d9e4
commit
e3c7eb271d
|
@ -80,7 +80,13 @@ void panic_log_registers(cpu_state_T* state) {
|
|||
void panic_log_call_stack(cpu_state_T* state) {
|
||||
log(LOG_NONE, "Call Stack:");
|
||||
stack_trace_call_stack(state->rbp);
|
||||
stack_dump_call_info(state->rip, symbol_resolve_function_from_rip(g_kernel_executable->symbols, g_kernel_executable->num_symbols, state->rip));
|
||||
|
||||
symbol_T* symbol = symbol_resolve_function_from_rip(g_kernel_executable->symbols, g_kernel_executable->num_symbols, state->rip);
|
||||
if (symbol != NULL) {
|
||||
stack_dump_call_info(state->rip, symbol);
|
||||
} else {
|
||||
log(LOG_NONE, " 0x%x -> <failed to resolve symbol>", state->rip);
|
||||
}
|
||||
}
|
||||
|
||||
void panic(cpu_state_T* state, string_t message) {
|
||||
|
|
Loading…
Reference in New Issue