1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 19:47:44 +00:00

Kernel: Symbolicate the crash address too, not just the call stack.

Also print it in shiny red to make it extra easy to spot. :^)
Fixes #244.
This commit is contained in:
Andreas Kling 2019-06-19 18:50:02 +02:00
parent c5d623e048
commit 15bea7153a
3 changed files with 11 additions and 7 deletions

View file

@ -171,14 +171,14 @@ void exception_6_handler(RegisterDump& regs)
current->pid());
dump(regs);
dump_backtrace();
if (current->process().is_ring0()) {
kprintf("Oh shit, we've crashed in ring 0 :(\n");
dump_backtrace();
hang();
}
current->process().crash(SIGILL);
current->process().crash(SIGILL, regs.eip);
}
// 7: FPU not available exception
@ -224,10 +224,11 @@ void exception_0_handler(RegisterDump& regs)
if (current->process().is_ring0()) {
kprintf("Oh shit, we've crashed in ring 0 :(\n");
dump_backtrace();
hang();
}
current->process().crash(SIGFPE);
current->process().crash(SIGFPE, regs.eip);
}
// 13: General Protection Fault
@ -240,10 +241,11 @@ void exception_13_handler(RegisterDumpWithExceptionCode& regs)
if (current->process().is_ring0()) {
kprintf("Oh shit, we've crashed in ring 0 :(\n");
dump_backtrace();
hang();
}
current->process().crash();
current->process().crash(SIGSEGV, regs.eip);
}
// 14: Page Fault
@ -285,7 +287,7 @@ void exception_14_handler(RegisterDumpWithExceptionCode& regs)
regs.exception_code & 2 ? "write" : "read",
faultAddress);
dump(regs);
current->process().crash();
current->process().crash(SIGSEGV, regs.eip);
} else if (response == PageFaultResponse::Continue) {
#ifdef PAGE_FAULT_DEBUG
dbgprintf("Continuing after resolved page fault\n");