Skip to content

Commit

Permalink
add debug messages
Browse files Browse the repository at this point in the history
  • Loading branch information
stlankes committed Jan 12, 2025
1 parent 134d42c commit bed7303
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/arch/x86/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,14 @@ use goblin::{elf, elf64};
use x86::controlregs;

pub fn load_application(path: &String) -> io::Result<()> {
debug!("Try to load application!");
info!("Try to load application!");
unsafe {
controlregs::cr3_write(paging::create_usr_pgd().as_u64());
}

let mut file = fs::File::open(path)?;
let len = file.len()?;
info!("File has a size of {} bytes", len);
let mut buffer: Vec<u8> = Vec::new();

buffer.resize(len, 0);
Expand Down

0 comments on commit bed7303

Please sign in to comment.