forked from AbleOS/ableos
not fixed but I can't handle this anymore
This commit is contained in:
parent
dd6431ab84
commit
11dc2bbddd
4
.gdbinit
Normal file
4
.gdbinit
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
set history save on
|
||||||
|
file target/x86_64-ableos/debug/ableos
|
||||||
|
target remote localhost:9000
|
||||||
|
tui enable
|
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -7,5 +7,5 @@ userland/*/target
|
||||||
kernel/target
|
kernel/target
|
||||||
userland/root_fs/mnt/*
|
userland/root_fs/mnt/*
|
||||||
target/
|
target/
|
||||||
|
.gdb_history
|
||||||
!*/.gitkeep
|
!*/.gitkeep
|
||||||
|
|
|
@ -9,7 +9,7 @@ panic = "abort"
|
||||||
|
|
||||||
[package.metadata.bootimage]
|
[package.metadata.bootimage]
|
||||||
run-args = [
|
run-args = [
|
||||||
"--nodefaults",
|
# "--nodefaults",
|
||||||
"-cpu",
|
"-cpu",
|
||||||
"Broadwell-v3",
|
"Broadwell-v3",
|
||||||
"-m",
|
"-m",
|
||||||
|
@ -33,8 +33,8 @@ run-args = [
|
||||||
"../img.ext2",
|
"../img.ext2",
|
||||||
|
|
||||||
|
|
||||||
"-qmp",
|
# "-qmp",
|
||||||
"unix:../qmp-sock,server,nowait",
|
# "unix:../qmp-sock,server,nowait",
|
||||||
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
@ -76,16 +76,16 @@ pub fn kernel_main() -> ! {
|
||||||
// }
|
// }
|
||||||
/*
|
/*
|
||||||
log_version_data();
|
log_version_data();
|
||||||
|
// */
|
||||||
x86_64::instructions::interrupts::without_interrupts(|| {
|
x86_64::instructions::interrupts::without_interrupts(|| {
|
||||||
let mut scheduler = SCHEDULER.lock();
|
let mut scheduler = SCHEDULER.lock();
|
||||||
// comment this out to resume normal use
|
// comment this out to resume normal use
|
||||||
// scheduler.enqueue_spawn(traceloop);
|
// scheduler.enqueue_spawn(traceloop);
|
||||||
|
|
||||||
// scheduler.enqueue_spawn(scratchpad);
|
scheduler.enqueue_spawn(scratchpad);
|
||||||
});
|
});
|
||||||
|
|
||||||
// */
|
// scratchpad();
|
||||||
scratchpad();
|
|
||||||
|
|
||||||
sloop()
|
sloop()
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,8 +51,8 @@ impl log::Log for SimpleLogger {
|
||||||
};
|
};
|
||||||
|
|
||||||
let line = match record.line() {
|
let line = match record.line() {
|
||||||
Some(line_number) => line_number.to_string(),
|
Some(line_number) => line_number,
|
||||||
None => "??".to_string(),
|
None => 0,
|
||||||
};
|
};
|
||||||
|
|
||||||
if KERNEL_CONF.logging.log_to_serial {
|
if KERNEL_CONF.logging.log_to_serial {
|
||||||
|
|
|
@ -137,7 +137,9 @@ pub fn real_shell() {
|
||||||
buf.push(chr);
|
buf.push(chr);
|
||||||
print!("{}", chr);
|
print!("{}", chr);
|
||||||
}
|
}
|
||||||
None => (),
|
None => {
|
||||||
|
// trace!("{}", buf);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,14 +54,15 @@ fn main() -> anyhow::Result<()> {
|
||||||
} => {
|
} => {
|
||||||
let _dir = xshell::pushd("./ableos");
|
let _dir = xshell::pushd("./ableos");
|
||||||
|
|
||||||
let debug_log: &[&str] = match debug {
|
|
||||||
true => &["-D", "debug.log"],
|
|
||||||
false => &[],
|
|
||||||
};
|
|
||||||
match machine.unwrap_or(MachineType::X86) {
|
match machine.unwrap_or(MachineType::X86) {
|
||||||
MachineType::X86 => {
|
MachineType::X86 => {
|
||||||
// export RUSTFLAGS=\"-Cforce-unwind-tables -Clink-arg=-Wl,eh_frame.ld\" &&
|
// export RUSTFLAGS=\"-Cforce-unwind-tables -Clink-arg=-Wl,eh_frame.ld\" &&
|
||||||
xshell::cmd!("cargo run --release -- -D debug.log").run()?;
|
|
||||||
|
match debug {
|
||||||
|
true => xshell::cmd!("cargo run -- -S -gdb tcp::9000").run()?,
|
||||||
|
false => xshell::cmd!("cargo run --release").run()?,
|
||||||
|
}
|
||||||
|
|
||||||
if profile {
|
if profile {
|
||||||
xshell::cmd!("python qprofiler.py --path=qmp-sock --filename=target/x86_64-ableos/release/ableos").run()?;
|
xshell::cmd!("python qprofiler.py --path=qmp-sock --filename=target/x86_64-ableos/release/ableos").run()?;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue