From 705b97541d415f7dd349894a089e93b015c1846b Mon Sep 17 00:00:00 2001 From: Jan Lindemann Date: Sun, 20 Aug 2017 08:59:59 +0000 Subject: [PATCH] debugger.mk: Fix executable detection from core file The executable which gdb was launched with is extracted from a core file and then transformed into an absolute path with "which". The latter failed, as by the time it's executed, PATH has not yet been expanded. Solved by using the executable name only, which then gets searched in the PATH by gdb. Signed-off-by: Jan Lindemann --- make/debugger.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/make/debugger.mk b/make/debugger.mk index 0d9296f2..1da16af2 100644 --- a/make/debugger.mk +++ b/make/debugger.mk @@ -8,7 +8,7 @@ endif CORE_DUMPER = $(shell echo -e "quit" | $(DEBUGGER) --core=$(CORE) 2>&1 | \ - $(SED) '/Core was generated/ !d; s/Core was generated by `//; s/ .*//' | xargs -r which) + $(SED) '/Core was generated/ !d; s/Core was generated by `//; s/ .*//') ifeq ($(CORE_DUMPER),) CORE_DUMPER = $(EXE_PATH) endif