|
|
@ -1,8 +1,15 @@
|
|
|
|
use x86_64::structures::idt::{Idt, ExceptionStackFrame};
|
|
|
|
use x86_64::structures::idt::{Idt, ExceptionStackFrame};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lazy_static! {
|
|
|
|
|
|
|
|
static ref IDT: Idt = {
|
|
|
|
|
|
|
|
let mut idt = Idt::new();
|
|
|
|
|
|
|
|
idt.breakpoint.set_handler_fn(breakpoint_handler);
|
|
|
|
|
|
|
|
idt
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
pub fn init() {
|
|
|
|
pub fn init() {
|
|
|
|
let mut idt = Idt::new();
|
|
|
|
IDT.load();
|
|
|
|
idt.breakpoint.set_handler_fn(breakpoint_handler);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
extern "x86-interrupt" fn breakpoint_handler(
|
|
|
|
extern "x86-interrupt" fn breakpoint_handler(
|
|
|
|