Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- pub fn init_idt() {
- let idt = Box::new(InterruptDescriptorTable::new());
- let static_ref = Box::leak(idt);
- static_ref.breakpoint.set_handler_fn(breakpoint_handler);
- static_ref.load();
- }
- extern "x86-interrupt" fn breakpoint_handler(
- stack_frame: &mut InterruptStackFrame)
- {
- writer("we're fine");
- }
Add Comment
Please, Sign In to add comment