Print context name in exception

This commit is contained in:
Jeremy Soller
2021-04-28 21:15:21 -06:00
parent 37e6951501
commit 73c77d756d

View File

@@ -33,7 +33,19 @@ exception_stack!(synchronous_exception_at_el0, |stack| {
println!("FATAL: Not an SVC induced synchronous exception");
stack.dump();
stack_trace();
println!("CPU {}, PID {:?}", cpu_id(), context::context_id());
// This could deadlock, but at this point we are going to halt anyways
{
let contexts = context::contexts();
if let Some(context_lock) = contexts.current() {
let context = context_lock.read();
println!("NAME: {}", *context.name.read());
}
}
// Halt
loop {}
}