parent
c2d22af1c7
commit
3bbc2a0bdc
@ -1,5 +1,12 @@
|
||||
use x86_64::structures::idt::Idt;
|
||||
use x86_64::structures::idt::{Idt, ExceptionStackFrame};
|
||||
|
||||
pub fn init() {
|
||||
let mut idt = Idt::new();
|
||||
idt.breakpoint.set_handler_fn(breakpoint_handler);
|
||||
}
|
||||
|
||||
extern "x86-interrupt" fn breakpoint_handler(
|
||||
stack_frame: &mut ExceptionStackFrame)
|
||||
{
|
||||
println!("EXCEPTION: BREAKPOINT\n{:#?}", stack_frame);
|
||||
}
|
||||
|
Loading…
Reference in new issue