backtracing should be safe now

This commit is contained in:
mwojcik 2022-10-10 16:04:38 +08:00
parent 4034be5da8
commit 31ceee7e22
1 changed files with 3 additions and 3 deletions

View File

@ -42,9 +42,6 @@ fn panic(info: &core::panic::PanicInfo) -> ! {
let mut err_led = ErrorLED::error_led(); let mut err_led = ErrorLED::error_led();
err_led.toggle(true); err_led.toggle(true);
} }
if !soft_panicked && id == 0 {
soft_panic(info);
}
println!("Backtrace: "); println!("Backtrace: ");
let _ = backtrace(|ip| { let _ = backtrace(|ip| {
// Backtrace gives us the return address, i.e. the address after the delay slot, // Backtrace gives us the return address, i.e. the address after the delay slot,
@ -52,6 +49,9 @@ fn panic(info: &core::panic::PanicInfo) -> ! {
print!("{:#08x} ", ip - 2 * 4); print!("{:#08x} ", ip - 2 * 4);
}); });
println!("\nEnd backtrace"); println!("\nEnd backtrace");
if !soft_panicked && id == 0 {
soft_panic(info);
}
loop {} loop {}
} }