From e53571ef5917e80f52d33ff32897bf0635c81baa Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sat, 8 Jan 2022 15:55:28 +0100 Subject: [PATCH] Kernel: Dump memory regions when crashing in ring 0 --- Kernel/Arch/x86/common/Interrupts.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Kernel/Arch/x86/common/Interrupts.cpp b/Kernel/Arch/x86/common/Interrupts.cpp index a595c0d1a8..88dddd5d78 100644 --- a/Kernel/Arch/x86/common/Interrupts.cpp +++ b/Kernel/Arch/x86/common/Interrupts.cpp @@ -234,8 +234,10 @@ void handle_crash(RegisterState const& regs, char const* description, int signal dmesgln("CRASH: CPU #{} {} in ring {}", Processor::current_id(), description, (regs.cs & 3)); dump(regs); - if (crashed_in_kernel) + if (crashed_in_kernel) { + process.address_space().dump_regions(); PANIC("Crash in ring 0"); + } process.crash(signal, regs.ip(), out_of_memory); }