Skip to content
Snippets Groups Projects
Verified Commit 220e53c2 authored by Jeremy Soller's avatar Jeremy Soller
Browse files

Show CPU and PID in kernel panic

parent c8263cc4
No related branches found
No related tags found
No related merge requests found
......@@ -3,7 +3,7 @@
use core::alloc::Layout;
use core::panic::PanicInfo;
use crate::interrupt;
use crate::{cpu_id, context, interrupt};
#[lang = "eh_personality"]
#[no_mangle]
......@@ -17,6 +17,9 @@ pub extern "C" fn rust_begin_unwind(info: &PanicInfo) -> ! {
unsafe { interrupt::stack_trace(); }
println!("CPU {}, PID {:?}", cpu_id(), context::context_id());
//WARNING: name cannot be grabed, it may deadlock
println!("HALT");
loop {
unsafe { interrupt::halt(); }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment