debugger.mk: Fix core file parsing from GDB output

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2019-07-22 15:50:40 +00:00
commit 32edd25779

View file

@ -6,7 +6,7 @@ CORE ?= $(firstword $(CORE_VG) $(CORE_REGULAR))
ifneq ($(CORE),) ifneq ($(CORE),)
ifneq ($(CORE),$(CORE_VG)) # trick doesn't work on valgrind cores ifneq ($(CORE),$(CORE_VG)) # trick doesn't work on valgrind cores
CORE_DUMPER = $(shell echo -e "quit" | $(DEBUGGER) --core=$(CORE) 2>&1 | \ 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/ .*//; s/\x27\.$$//')
else else
CORE_DUMPER = $(EXE_PATH) CORE_DUMPER = $(EXE_PATH)
endif endif