diff --git a/assets/debugging/jsix.elf-gdb.py b/assets/debugging/jsix.elf-gdb.py index a916e45..d54a537 100644 --- a/assets/debugging/jsix.elf-gdb.py +++ b/assets/debugging/jsix.elf-gdb.py @@ -24,8 +24,5 @@ class PrintStackCommand(gdb.Command): PrintStackCommand() -import time -time.sleep(3.5) gdb.execute("target remote :1234") -gdb.execute("set waiting = false") gdb.execute("display/i $rip") diff --git a/qemu.sh b/qemu.sh index 159e1f8..efed10b 100755 --- a/qemu.sh +++ b/qemu.sh @@ -3,6 +3,7 @@ build="$(dirname $0)/build" assets="$(dirname $0)/assets" debug="" +debugtarget="${build}/jsix.elf" flash_name="ovmf_vars" gfx="-nographic" kvm="" @@ -10,8 +11,13 @@ cpu="Broadwell,+pdpe1gb" for arg in $@; do case "${arg}" in + --debugboot) + debug="-s -S" + debugtarget="${build}/boot/boot.efi" + flash_name="ovmf_vars_d" + ;; --debug) - debug="-s" + debug="-s -S" flash_name="ovmf_vars_d" ;; --gfx) @@ -37,7 +43,7 @@ fi if [[ -n $TMUX ]]; then if [[ -n $debug ]]; then - tmux split-window "gdb ${build}/jsix.elf" & + tmux split-window -h "gdb ${debugtarget}" & else tmux split-window -l 10 "sleep 1; telnet localhost 45454" & fi diff --git a/src/kernel/main.cpp b/src/kernel/main.cpp index 8d107be..aca26fc 100644 --- a/src/kernel/main.cpp +++ b/src/kernel/main.cpp @@ -72,9 +72,6 @@ init_console() void kernel_main(args::header *header) { - bool waiting = header && (header->mode == args::mode::debug); - while (waiting); - kutil::assert_set_callback(__kernel_assert); init_console();