more qemu opts and gdb

This commit is contained in:
Murphy 2025-03-25 18:00:51 -04:00
parent 9b26a288ae
commit 3152b2ae07
Signed by: freya
GPG key ID: 9FBC6FFD6D2DBF17
2 changed files with 15 additions and 4 deletions

View file

@ -3,11 +3,22 @@
.SILENT:
QEMU = qemu-system-i386
QEMUOPTS = -drive file=bin/disk.img,index=0,media=disk,format=raw
QEMUOPTS = -drive file=bin/disk.img,index=0,media=disk,format=raw \
-no-reboot -d cpu_reset \
-serial mon:stdio \
-m 4G \
-display sdl \
-enable-kvm \
-name kern
qemu: bin/disk.img
$(QEMU) -serial mon:stdio $(QEMUOPTS)
$(QEMU) $(QEMUOPTS)
qemu-gdb: bin/disk.img
$(QEMU) $(QEMUOPTS) -S -gdb tcp::1337
gdb:
gdb -q -n -x util/gdbinit
clean:
rm -fr .zig-cache

View file

@ -20,8 +20,8 @@ define hook-stop
set $lastcs = $cs
end
echo + target remote localhost:1234\n
target remote localhost:1234
echo + target remote localhost:1337\n
target remote localhost:1337
# If this fails, it's probably because your GDB doesn't support ELF.
# Look at the tools page at