debugger.mk performance: Don't run gdb if no core file is present

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2019-04-27 15:28:14 +00:00
commit 73ced2f4ec

View file

@ -1,7 +1,8 @@
CORE_DUMPER = $(shell echo -e "quit" | $(DEBUGGER) --core=$(CORE) 2>&1 | \ ifneq ($(CORE),)
CORE_DUMPER = $(shell echo -e "quit" | $(DEBUGGER) --core=$(CORE) 2>&1 | \
$(SED) '/Core was generated/ !d; s/Core was generated by `//; s/ .*//') $(SED) '/Core was generated/ !d; s/Core was generated by `//; s/ .*//')
ifeq ($(CORE_DUMPER),) else ifeq ($(CORE_DUMPER),)
CORE_DUMPER = $(EXE_PATH) CORE_DUMPER = $(EXE_PATH)
endif endif
PID = $(shell pidof $(EXE_PATH)) PID = $(shell pidof $(EXE_PATH))