Kernel: Make a portable wrapper for the breakpoint instruction

This commit is contained in:
apio 2022-11-01 11:10:55 +01:00
parent d2fb4a68ca
commit 06c7bbac0d
2 changed files with 5 additions and 3 deletions

View File

@ -24,4 +24,8 @@ pub fn halt() -> ! {
pub fn wait_for_interrupt() -> () {
unsafe { asm!("hlt"); }
}
pub fn breakpoint() -> () {
unsafe { asm!("int3"); }
}

View File

@ -15,8 +15,6 @@ mod log;
use arch::cpu;
use arch::interrupts;
use x86_64::instructions::interrupts::int3;
use video::Color;
#[no_mangle]
@ -35,7 +33,7 @@ pub extern "C" fn _start() -> ! {
interrupts::enable();
int3();
cpu::breakpoint();
println!("Still here!");