mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-16 22:37:49 +00:00
Add a print_error function, which works for exceptions inside println
This commit is contained in:
@@ -49,8 +49,8 @@ pub extern "C" fn rust_main(multiboot_information_address: usize) {
|
||||
// initialize our IDT
|
||||
interrupts::init();
|
||||
|
||||
// provoke a page fault by writing to some random address
|
||||
unsafe{ *(0xdeadbeaf as *mut u64) = 42 };
|
||||
// provoke a page fault inside println
|
||||
println!("{:?}", unsafe{ *(0xdeadbeaf as *mut u64) = 42 });
|
||||
|
||||
println!("It did not crash!");
|
||||
loop {}
|
||||
|
||||
Reference in New Issue
Block a user