diff --git a/kernel/src/mm/stack.c b/kernel/src/mm/stack.c index a13d4ef..47be71f 100644 --- a/kernel/src/mm/stack.c +++ b/kernel/src/mm/stack.c @@ -32,10 +32,14 @@ void stack_dump_call_info(uint64_t rip, symbol_T* symbol) { void stack_trace_call_stack(uint64_t rbp) { uint64_t rip = ((uint64_t*)rbp)[1]; process_T* process = scheduler_get_current_process(); + if (process == NULL) { + log(LOG_NONE, " 0x%x -> (process NULL reference)", rip); + return; + } symbol_T* symbol = symbol_resolve_function_from_rip(process->executable->symbols, process->executable->num_symbols, rip); if (symbol == NULL) { - log(LOG_NONE, " 0x%x -> ", rip); + log(LOG_NONE, " 0x%x -> (symbol NULL reference)", rip); return; } diff --git a/kernel/src/utils/panic.c b/kernel/src/utils/panic.c index 023ae22..01daadf 100644 --- a/kernel/src/utils/panic.c +++ b/kernel/src/utils/panic.c @@ -91,7 +91,7 @@ void panic_log_call_stack(cpu_state_T* state) { symbol_T* symbol = symbol_resolve_function_from_rip(process->executable->symbols, process->executable->num_symbols, state->rip); if (symbol == NULL) { - log(LOG_NONE, " 0x%x -> ", state->rip); + log(LOG_NONE, " 0x%x -> (symbol NULL reference)", state->rip); return; }