mirror of
https://github.com/rcore-os/rCore-Tutorial-v3.git
synced 2024-11-22 09:26:26 +04:00
Kernel cannot dump now.
This commit is contained in:
parent
abd9d361e4
commit
cf6d905ac4
@ -69,7 +69,7 @@ pub fn trap_handler() -> ! {
|
|||||||
Trap::Exception(Exception::LoadFault) |
|
Trap::Exception(Exception::LoadFault) |
|
||||||
Trap::Exception(Exception::LoadPageFault) => {
|
Trap::Exception(Exception::LoadPageFault) => {
|
||||||
println!(
|
println!(
|
||||||
"[kernel] {:?} in application, bad addr = {:#x}, bad instruction = {:#x}, core dumped.",
|
"[kernel] {:?} in application, bad addr = {:#x}, bad instruction = {:#x}, kernel killed it.",
|
||||||
scause.cause(),
|
scause.cause(),
|
||||||
stval,
|
stval,
|
||||||
current_trap_cx().sepc,
|
current_trap_cx().sepc,
|
||||||
@ -78,7 +78,7 @@ pub fn trap_handler() -> ! {
|
|||||||
exit_current_and_run_next(-2);
|
exit_current_and_run_next(-2);
|
||||||
}
|
}
|
||||||
Trap::Exception(Exception::IllegalInstruction) => {
|
Trap::Exception(Exception::IllegalInstruction) => {
|
||||||
println!("[kernel] IllegalInstruction in application, core dumped.");
|
println!("[kernel] IllegalInstruction in application, kernel killed it.");
|
||||||
// illegal instruction exit code
|
// illegal instruction exit code
|
||||||
exit_current_and_run_next(-3);
|
exit_current_and_run_next(-3);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user