Skip to content

Commit

Permalink
Update code for changes in x86_64 0.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
phil-opp committed Mar 9, 2019
1 parent eee9d7b commit b895f8c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/bin/test-exception-breakpoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use core::panic::PanicInfo;
pub extern "C" fn _start() -> ! {
blog_os::interrupts::init_idt();

x86_64::instructions::int3();
x86_64::instructions::interrupts::int3();

serial_println!("ok");

Expand Down
4 changes: 2 additions & 2 deletions src/interrupts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

use crate::println;
use lazy_static::lazy_static;
use x86_64::structures::idt::{ExceptionStackFrame, InterruptDescriptorTable};
use x86_64::structures::idt::{InterruptDescriptorTable, InterruptStackFrame};

lazy_static! {
static ref IDT: InterruptDescriptorTable = {
Expand All @@ -20,6 +20,6 @@ pub fn init_idt() {
IDT.load();
}

extern "x86-interrupt" fn breakpoint_handler(stack_frame: &mut ExceptionStackFrame) {
extern "x86-interrupt" fn breakpoint_handler(stack_frame: &mut InterruptStackFrame) {
println!("EXCEPTION: BREAKPOINT\n{:#?}", stack_frame);
}
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pub extern "C" fn _start() -> ! {
blog_os::interrupts::init_idt();

// invoke a breakpoint exception
x86_64::instructions::int3();
x86_64::instructions::interrupts::int3();

println!("It did not crash!");
loop {}
Expand Down

0 comments on commit b895f8c

Please sign in to comment.