[tooling] Remove old GDB workarounds
GDB works far better now with QEMU's `-S` flag. No longer does it complain about changing the target from 32 to 64 bits. Get rid of the old `waiting` loop and `sleep` call in the GDB config for the kernel. Tags: debugging
This commit is contained in:
@@ -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")
|
||||
|
||||
10
qemu.sh
10
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
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user