mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-16 14:27:49 +00:00
The error code issue is fixed, so let's print it (#643)
See https://github.com/phil-opp/blog_os/issues/513 for more information.
This commit is contained in:
committed by
GitHub
parent
30e0b16a81
commit
7020999ab8
@@ -59,12 +59,13 @@ extern "x86-interrupt" fn breakpoint_handler(stack_frame: &mut InterruptStackFra
|
|||||||
|
|
||||||
extern "x86-interrupt" fn page_fault_handler(
|
extern "x86-interrupt" fn page_fault_handler(
|
||||||
stack_frame: &mut InterruptStackFrame,
|
stack_frame: &mut InterruptStackFrame,
|
||||||
_error_code: PageFaultErrorCode,
|
error_code: PageFaultErrorCode,
|
||||||
) {
|
) {
|
||||||
use x86_64::registers::control::Cr2;
|
use x86_64::registers::control::Cr2;
|
||||||
|
|
||||||
println!("EXCEPTION: PAGE FAULT");
|
println!("EXCEPTION: PAGE FAULT");
|
||||||
println!("Accessed Address: {:?}", Cr2::read());
|
println!("Accessed Address: {:?}", Cr2::read());
|
||||||
|
println!("Error Code: {:?}", error_code);
|
||||||
println!("{:#?}", stack_frame);
|
println!("{:#?}", stack_frame);
|
||||||
hlt_loop();
|
hlt_loop();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user