mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-15 12:03:31 +01:00
debugger.mk, defs-cpp.mk: CORE_DUMPER was misdetected for valgrind vgcore files
gdb --core=vgcore.123 doesn't output a usable executable path with "was generated by ...". This commit make make gdb fall back to using $(EXE_PATH) as the executable with valgrind core files. Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
770a42cc76
commit
7d7a75c389
2 changed files with 14 additions and 7 deletions
|
|
@ -1,6 +1,15 @@
|
||||||
|
CORE_IGNORE := $(wildcard *.intern-state*)
|
||||||
|
CORE_VG ?= $(firstword $(filter-out $(CORE_IGNORE),$(wildcard vgcore vgcore.*)))
|
||||||
|
CORE_REGULAR ?= $(firstword $(filter-out $(CORE_IGNORE),$(wildcard core core.*)))
|
||||||
|
CORE ?= $(firstword $(CORE_VG) $(CORE_REGULAR))
|
||||||
|
|
||||||
ifneq ($(CORE),)
|
ifneq ($(CORE),)
|
||||||
CORE_DUMPER = $(shell echo -e "quit" | $(DEBUGGER) --core=$(CORE) 2>&1 | \
|
ifneq ($(CORE),$(CORE_VG)) # trick doesn't work on valgrind cores
|
||||||
|
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/ .*//')
|
||||||
|
else
|
||||||
|
CORE_DUMPER = $(EXE_PATH)
|
||||||
|
endif
|
||||||
else ifeq ($(CORE_DUMPER),)
|
else ifeq ($(CORE_DUMPER),)
|
||||||
CORE_DUMPER = $(EXE_PATH)
|
CORE_DUMPER = $(EXE_PATH)
|
||||||
endif
|
endif
|
||||||
|
|
@ -11,24 +20,24 @@ all:
|
||||||
|
|
||||||
gdb ddd:
|
gdb ddd:
|
||||||
ifneq ($(CORE),)
|
ifneq ($(CORE),)
|
||||||
$@ --core=$(firstword $(CORE)) --args $(CORE_DUMPER) $(EXE_ARGS)
|
$@ --core=$(CORE) --args $(CORE_DUMPER) $(EXE_ARGS)
|
||||||
else
|
else
|
||||||
$@ --args $(CORE_DUMPER) $(EXE_ARGS)
|
$@ --args $(CORE_DUMPER) $(EXE_ARGS)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
lldb:
|
lldb:
|
||||||
ifneq ($(CORE),)
|
ifneq ($(CORE),)
|
||||||
$@ --core $(firstword $(CORE)) -f $(CORE_DUMPER) -- $(EXE_ARGS)
|
$@ --core $(CORE) -f $(CORE_DUMPER) -- $(EXE_ARGS)
|
||||||
else
|
else
|
||||||
$@ -f $(CORE_DUMPER) -- $(EXE_ARGS)
|
$@ -f $(CORE_DUMPER) -- $(EXE_ARGS)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
kdbg:
|
kdbg:
|
||||||
$@ $(CORE_DUMPER) $(firstword $(CORE)) -a "$(EXE_ARGS)"
|
$@ $(CORE_DUMPER) $(CORE) -a "$(EXE_ARGS)"
|
||||||
|
|
||||||
cgdb:
|
cgdb:
|
||||||
ifneq ($(CORE),)
|
ifneq ($(CORE),)
|
||||||
$@ -- --core=$(firstword $(CORE)) --args $(CORE_DUMPER) $(EXE_ARGS)
|
$@ -- --core=$(CORE) --args $(CORE_DUMPER) $(EXE_ARGS)
|
||||||
else
|
else
|
||||||
$@ -- --args $(CORE_DUMPER) $(EXE_ARGS)
|
$@ -- --args $(CORE_DUMPER) $(EXE_ARGS)
|
||||||
endif
|
endif
|
||||||
|
|
|
||||||
|
|
@ -472,8 +472,6 @@ ALL_C += $(LOCAL_C) $(PREREQ_CPP)
|
||||||
ALL_CPP += $(LOCAL_CPP) $(PREREQ_CPP)
|
ALL_CPP += $(LOCAL_CPP) $(PREREQ_CPP)
|
||||||
ALL_CSRC += $(LOCAL_CSRC) $(PREREQ_CSRC)
|
ALL_CSRC += $(LOCAL_CSRC) $(PREREQ_CSRC)
|
||||||
|
|
||||||
CORE += $(filter-out $(wildcard *.intern-state*),$(wildcard core core.* vgcore vgcore.*))
|
|
||||||
|
|
||||||
ifeq ($(USE_QT),true)
|
ifeq ($(USE_QT),true)
|
||||||
include $(JWBDIR)/make/qtversion.mk
|
include $(JWBDIR)/make/qtversion.mk
|
||||||
include $(JWBDIR)/make/qt-defs.mk
|
include $(JWBDIR)/make/qt-defs.mk
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue