mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-16 14:27:49 +00:00
Test our exception handler by invoking a breakpoint exception
This commit is contained in:
@@ -48,12 +48,17 @@ pub extern "C" fn rust_main(multiboot_information_address: usize) {
|
|||||||
HEAP_ALLOCATOR.lock().init(HEAP_START, HEAP_START + HEAP_SIZE);
|
HEAP_ALLOCATOR.lock().init(HEAP_START, HEAP_START + HEAP_SIZE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// initialize our IDT
|
||||||
|
interrupts::init();
|
||||||
|
|
||||||
for i in 0..10000 {
|
for i in 0..10000 {
|
||||||
format!("Some String");
|
format!("Some String");
|
||||||
}
|
}
|
||||||
|
|
||||||
println!("It did not crash!");
|
// invoke a breakpoint exception
|
||||||
|
x86_64::instructions::interrupts::int3();
|
||||||
|
|
||||||
|
println!("It did not crash!");
|
||||||
loop {}
|
loop {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user