Kernel: Make a portable wrapper for the breakpoint instruction
This commit is contained in:
parent
d2fb4a68ca
commit
06c7bbac0d
@ -24,4 +24,8 @@ pub fn halt() -> ! {
|
||||
|
||||
pub fn wait_for_interrupt() -> () {
|
||||
unsafe { asm!("hlt"); }
|
||||
}
|
||||
|
||||
pub fn breakpoint() -> () {
|
||||
unsafe { asm!("int3"); }
|
||||
}
|
@ -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!");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user