From 0c79af3f903f358beb6d8860c93811db758db6b9 Mon Sep 17 00:00:00 2001 From: Achilleas Anagnostopoulos Date: Wed, 28 Jun 2017 18:18:00 +0100 Subject: [PATCH] Substitute source paths when running GDB on OSX The generated DWARF information contains absolute file paths for the source files which causes issues when debugging on OSX as GDB cannot lookup the source files. --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index ad1c535..a35d2b2 100644 --- a/Makefile +++ b/Makefile @@ -131,7 +131,8 @@ gdb: iso -ex 'file $(kernel_target)' \ -ex 'target remote localhost:1234' \ -ex 'set arch i386:x86-64:intel' \ - -ex 'source $(GOROOT)/src/runtime/runtime-gdb.py' + -ex 'source $(GOROOT)/src/runtime/runtime-gdb.py' \ + -ex 'set substitute-path $(VAGRANT_SRC_FOLDER) $(shell pwd)' @killall qemu-system-$(ARCH) || true clean: