mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-18 08:52:45 +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 epc = sepc::read();
|
||||||
|
|
||||||
let ex = RiscvException::from_regs(sc.bits(), epc, stval::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 pid = current_pid();
|
||||||
let ex = RiscvException::from_regs(sc.bits(), sepc::read(), stval::read());
|
let ex = RiscvException::from_regs(sc.bits(), sepc::read(), stval::read());
|
||||||
let tid = ArchProcess::with_current(|p| p.current_tid());
|
let tid = ArchProcess::with_current(|p| p.current_tid());
|
||||||
println!(
|
println!(
|
||||||
"IRQ ({}.{}): {} sepc {:x}", // reg {:08x?}
|
"IRQ ({}.{}): {} sepc {:x} sim {:x}", // reg {:08x?}
|
||||||
pid,
|
pid,
|
||||||
tid,
|
tid,
|
||||||
ex,
|
ex,
|
||||||
sepc::read(),
|
sepc::read(),
|
||||||
|
sim_read(),
|
||||||
// ArchProcess::with_current(|p| p.current_thread().registers)
|
// ArchProcess::with_current(|p| p.current_thread().registers)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue