summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kernel/src/interrupts/exceptions.rs10
1 files changed, 4 insertions, 6 deletions
diff --git a/kernel/src/interrupts/exceptions.rs b/kernel/src/interrupts/exceptions.rs
index 88c78a7..057adbc 100644
--- a/kernel/src/interrupts/exceptions.rs
+++ b/kernel/src/interrupts/exceptions.rs
@@ -37,10 +37,9 @@ pub extern "x86-interrupt" fn segment_not_present_handler(
error_code: u64,
) {
panic!(
- "SEGMENT NOT PRESENT: {:?}Flags: {:b} Stack: {:x}",
+ "SEGMENT NOT PRESENT exception\nerror code: 0x{:x}\n{}",
error_code,
- stack_frame.cpu_flags,
- stack_frame.stack_pointer.as_u64()
+ exception_default!(stack_frame)
);
}
@@ -49,8 +48,7 @@ pub extern "x86-interrupt" fn double_fault_handler(
_error_code: u64, // code is always zero
) {
panic!(
- "DOUBLE FAULT Flags: {:b} Stack: {:x}",
- stack_frame.cpu_flags,
- stack_frame.stack_pointer.as_u64()
+ "DOUBLE FAULT\nthis is a fatal exception\n{}",
+ exception_default!(stack_frame)
);
}