summaryrefslogtreecommitdiff
path: root/kernel/src/interrupts
diff options
context:
space:
mode:
authornatrixaeria <upezu@student.kit.edu>2019-11-09 02:00:29 +0100
committernatrixaeria <upezu@student.kit.edu>2019-11-09 02:00:29 +0100
commitfdb9cbebc5eefbb89886eef86ab71dfac70cc39a (patch)
tree78dc3060a777e696ea8ac36c853c9da81d499c1f /kernel/src/interrupts
parent405b2a3ed380931225095c65c80eba7f11f0faa4 (diff)
Add error messages
Diffstat (limited to 'kernel/src/interrupts')
-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)
);
}