fix (stack-tracing): added check if symbol resolved correctly
This commit is contained in:
parent
9d5ba72228
commit
e0494263da
|
@ -34,7 +34,12 @@ void stack_trace_call_stack(uint64_t rbp) {
|
|||
process_T* process = scheduler_get_current_process();
|
||||
symbol_T* symbol = symbol_resolve_function_from_rip(process->executable->symbols, process->executable->num_symbols, rip);
|
||||
|
||||
if (symbol != NULL && !string_compare(symbol->name, "_start")) {
|
||||
if (symbol == NULL) {
|
||||
log(LOG_NONE, " 0x%x -> <failed to resolve symbol>", rip);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!string_compare(symbol->name, "_start")) {
|
||||
stack_trace_call_stack(((uint64_t*)rbp)[0]);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue