broaded scope of conditional compilation

This commit is contained in:
bunnie 2024-04-28 02:57:04 +08:00
parent 588e1cf9f1
commit 863f17652d

View file

@ -187,10 +187,10 @@ pub extern "C" fn trap_handler(
let epc = sepc::read();
let ex = RiscvException::from_regs(sc.bits(), epc, stval::read());
#[cfg(feature = "debug-print")]
{
let pid = current_pid();
let ex = RiscvException::from_regs(sc.bits(), sepc::read(), stval::read());
#[cfg(feature = "debug-print")]
println!("IRQ -- KERNEL({}): RISC-V fault: {}", pid, ex);
}
match ex {