add debug info on irq failure

This commit is contained in:
bunnie 2025-09-09 17:50:03 +08:00
parent 9931daf131
commit 365657984c

View file

@ -217,6 +217,7 @@ pub extern "C" fn trap_handler(
{
let pid = current_pid();
let ex = RiscvException::from_regs(sc.bits(), sepc::read(), stval::read());
MemoryMapping::current().print_map();
panic!("KERNEL({}): RISC-V fault: {} - maybe ran out of kernel stack?", pid, ex);
}