From c03c996a48a528b92a3f241fc4c90e0c3f78154c Mon Sep 17 00:00:00 2001 From: Mark Date: Mon, 24 Feb 2025 21:41:56 -0800 Subject: [PATCH] Added `qemu-gdb` target --- Makefile | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 5bdea49..f25b6ea 100644 --- a/Makefile +++ b/Makefile @@ -116,7 +116,19 @@ qemu-remote: -serial stdio \ -fda "$(BUILD)/disk.img" -# -gdb tcp::26000 \ -# -S -# -enable-kvm \ -# -cpu host \ \ No newline at end of file +# Same as qemu, but with gdb options +.PHONY: qemu-gdb +qemu-gdb: $(BUILD)/disk.img + qemu-system-i386 \ + -d cpu_reset \ + -no-reboot \ + -smp 1 -m 2048 \ + -machine q35 \ + -net none \ + -serial stdio \ + -fda "$<" \ + -gdb tcp::26000 \ + -S + +# Do not use `-enable-kvm` or `-cpu host`, +# this confuses gdb. \ No newline at end of file