diff --git a/Makefile b/Makefile index 43dd5c14..cda1b210 100644 --- a/Makefile +++ b/Makefile @@ -101,7 +101,7 @@ gdb: FORCE # has started or you need to debug the interaction between the application and the kernel. # tl;dr: DO NOT USE THIS TARGET UNLESS YOU HAVE TO gdb-userspace: FORCE - rust-gdb $(GDB_APP_FILE) --eval-command="add-symbol-file $(GDB_KERNEL_FILE) 0x$(shell readelf -S $(GDB_KERNEL_FILE) | grep .text | cut -c43-58)" --eval-command="target remote :1234" + rust-gdb $(GDB_APP_FILE) --eval-command="add-symbol-file $(GDB_KERNEL_FILE)" --eval-command="target remote :1234" # An empty target FORCE: diff --git a/mk/qemu.mk b/mk/qemu.mk index 202aca16..b9740e61 100644 --- a/mk/qemu.mk +++ b/mk/qemu.mk @@ -22,6 +22,7 @@ ifeq ($(ARCH),i686) endif else ifeq ($(ARCH),x86_64) gpu?=vga + uefi?=yes VGA_SUPPORTED=yes QEMU_ARCH=x86_64 QEMU_MACHINE?=q35 @@ -90,7 +91,6 @@ else ifeq ($(ARCH),aarch64) endif else ifeq ($(ARCH),riscv64gc) live=no - efi=yes audio=no gpu?=ramfb net=bridge @@ -272,6 +272,9 @@ endif ifeq ($(gdb),yes) QEMUFLAGS+=-d cpu_reset -s -S +else ifeq ($(gdb),nonblock) + # Allow attaching gdb, but don't block for it + QEMUFLAGS+=-d cpu_reset -s endif ifeq ($(UNAME),Linux)