|
|
|
@ -33,12 +33,12 @@ pub fn trap_handler(cx: &mut TrapContext) -> &mut TrapContext {
|
|
|
|
|
}
|
|
|
|
|
Trap::Exception(Exception::StoreFault) |
|
|
|
|
|
Trap::Exception(Exception::StorePageFault) => {
|
|
|
|
|
println!("[kernel] PageFault in application, bad addr = {:#x}, bad instruction = {:#x}, core dumped.", stval, cx.sepc);
|
|
|
|
|
println!("[kernel] PageFault in application, bad addr = {:#x}, bad instruction = {:#x}, kernel killed it.", stval, cx.sepc);
|
|
|
|
|
panic!("[kernel] Cannot continue!");
|
|
|
|
|
//run_next_app();
|
|
|
|
|
}
|
|
|
|
|
Trap::Exception(Exception::IllegalInstruction) => {
|
|
|
|
|
println!("[kernel] IllegalInstruction in application, core dumped.");
|
|
|
|
|
println!("[kernel] IllegalInstruction in application, kernel killed it.");
|
|
|
|
|
panic!("[kernel] Cannot continue!");
|
|
|
|
|
//run_next_app();
|
|
|
|
|
}
|
|
|
|
|