From fa72198c408389f471fb4e3ced11370aad1b5da7 Mon Sep 17 00:00:00 2001 From: Maciek Borzecki Date: Sun, 4 Jun 2017 12:25:04 +0200 Subject: [PATCH] build: add run-gdb target Add make target 'run-gdb' that will automatically start gdb with G_MESSAGES_DEBUG=all and G_DEBUG=fatal-criticals environment variables. --- Makefile.am | 10 ++++++++++ gdb-script.in | 4 ++++ 2 files changed, 14 insertions(+) create mode 100644 gdb-script.in diff --git a/Makefile.am b/Makefile.am index 7bfcdb4..1e53974 100644 --- a/Makefile.am +++ b/Makefile.am @@ -142,6 +142,16 @@ git-source-dist: #------------------------------------------------------------- +run-gdb: gdb-script install + gdb -x gdb-script + +.PHONY: run-gdb + +gdb-script: gdb-script.in + sed -e 's,[@]bindir[@],${bindir},g' < $< > $@ + +#------------------------------------------------------------- + GEN_FROM_VALA = $(filter %.vala,$(mconnect_SOURCES)) BUILT_SOURCES = \ mconnect.desktop \ diff --git a/gdb-script.in b/gdb-script.in new file mode 100644 index 0000000..f1051ba --- /dev/null +++ b/gdb-script.in @@ -0,0 +1,4 @@ +set environment G_MESSAGES_DEBUG = all +set environment G_DEBUG = fatal-criticals +file @bindir@/mconnect +run \ No newline at end of file