mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-16 08:38:26 +00:00
add debug options for sussing out IRQ problems in the kernel
This commit is contained in:
parent
99bf1276db
commit
735c4bfedd
1 changed files with 3 additions and 2 deletions
|
|
@ -190,17 +190,18 @@ pub extern "C" fn trap_handler(
|
|||
let epc = sepc::read();
|
||||
|
||||
let ex = RiscvException::from_regs(sc.bits(), epc, stval::read());
|
||||
#[cfg(feature = "debug-print")]
|
||||
#[cfg(any(feature = "debug-print"))] // , feature = "debug-swap-verbose"
|
||||
{
|
||||
let pid = current_pid();
|
||||
let ex = RiscvException::from_regs(sc.bits(), sepc::read(), stval::read());
|
||||
let tid = ArchProcess::with_current(|p| p.current_tid());
|
||||
println!(
|
||||
"IRQ ({}.{}): {} sepc {:x}", // reg {:08x?}
|
||||
"IRQ ({}.{}): {} sepc {:x} sim {:x}", // reg {:08x?}
|
||||
pid,
|
||||
tid,
|
||||
ex,
|
||||
sepc::read(),
|
||||
sim_read(),
|
||||
// ArchProcess::with_current(|p| p.current_thread().registers)
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue