mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-18 08:52:45 +00:00
put debug prints behind debug flags
This commit is contained in:
parent
ced0b09881
commit
ecf2396d0c
2 changed files with 2 additions and 1 deletions
|
|
@ -190,6 +190,7 @@ pub extern "C" fn trap_handler(
|
||||||
{
|
{
|
||||||
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());
|
||||||
|
#[cfg(feature = "debug-print")]
|
||||||
println!("IRQ -- KERNEL({}): RISC-V fault: {}", pid, ex);
|
println!("IRQ -- KERNEL({}): RISC-V fault: {}", pid, ex);
|
||||||
}
|
}
|
||||||
match ex {
|
match ex {
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ pub fn resume(supervisor: bool, thread: &Thread) -> ! {
|
||||||
|
|
||||||
// Return to the appropriate CPU mode
|
// Return to the appropriate CPU mode
|
||||||
set_supervisor(supervisor);
|
set_supervisor(supervisor);
|
||||||
|
#[cfg(feature = "debug-print")]
|
||||||
println!(
|
println!(
|
||||||
"Switching to PID {}, SP: {:08x}, PC: {:08x}",
|
"Switching to PID {}, SP: {:08x}, PC: {:08x}",
|
||||||
crate::arch::current_pid(),
|
crate::arch::current_pid(),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue