From 7a0bb1ff7bcb8ae8d9ab697a9eaa0eedf564ddc4 Mon Sep 17 00:00:00 2001 From: Philipp Oppermann Date: Mon, 31 Oct 2016 01:37:37 +0100 Subject: [PATCH] Print an empty line before exception error messages --- src/interrupts/mod.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/interrupts/mod.rs b/src/interrupts/mod.rs index b74cd24d..da2325b2 100644 --- a/src/interrupts/mod.rs +++ b/src/interrupts/mod.rs @@ -115,20 +115,20 @@ struct ExceptionStackFrame { extern "C" fn divide_by_zero_handler(stack_frame: *const ExceptionStackFrame) { let stack_frame = unsafe { &*stack_frame }; - println!("EXCEPTION: DIVIDE BY ZERO\n{:#?}", stack_frame); + println!("\nEXCEPTION: DIVIDE BY ZERO\n{:#?}", stack_frame); loop {} } extern "C" fn breakpoint_handler(stack_frame: *const ExceptionStackFrame) { let stack_frame = unsafe { &*stack_frame }; - println!("EXCEPTION: BREAKPOINT at {:#x}\n{:#?}", + println!("\nEXCEPTION: BREAKPOINT at {:#x}\n{:#?}", stack_frame.instruction_pointer, stack_frame); } extern "C" fn invalid_opcode_handler(stack_frame: *const ExceptionStackFrame) { let stack_frame = unsafe { &*stack_frame }; - println!("EXCEPTION: INVALID OPCODE at {:#x}\n{:#?}", + println!("\nEXCEPTION: INVALID OPCODE at {:#x}\n{:#?}", stack_frame.instruction_pointer, *stack_frame); loop {} @@ -147,7 +147,7 @@ bitflags! { extern "C" fn page_fault_handler(stack_frame: *const ExceptionStackFrame, error_code: u64) { let stack_frame = unsafe { &*stack_frame }; use x86::controlregs; - println!("EXCEPTION: PAGE FAULT while accessing {:#x}\nerror code: \ + println!("\nEXCEPTION: PAGE FAULT while accessing {:#x}\nerror code: \ {:?}\n{:#?}", unsafe { controlregs::cr2() }, PageFaultErrorCode::from_bits(error_code).unwrap(),