From 4f2efe1c56e85202d9371a91294c8fbbe94e4e9f Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Sun, 24 Aug 2025 19:05:28 +0200 Subject: [PATCH] Simplify gdb-userspace Turns out gdb already handles locating the .text section when you don't specify the offset. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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: