From 135efd5705645e6a7fda7cd7f961783caf391078 Mon Sep 17 00:00:00 2001 From: Daniel Lange Date: Tue, 16 Feb 2021 11:22:02 +0100 Subject: [PATCH 1/2] Enable making with -ggdb3 on configure --enable-debug --- configure.ac | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 4626b592..b2e3fefb 100644 --- a/configure.ac +++ b/configure.ac @@ -567,11 +567,13 @@ fi AC_ARG_ENABLE([debug], [AS_HELP_STRING([--enable-debug], - [Enable asserts and internal sanity checks @<:@default=no@:>@])], + [Enable compiling with maximum debug info, asserts and internal sanity checks @<:@default=no@:>@])], [], [enable_debug=no]) if test "x$enable_debug" != xyes; then AM_CPPFLAGS="$AM_CPPFLAGS -DNDEBUG" +else + AM_CPPFLAGS="$AM_CPPFLAGS -ggdb3" fi From a89521ed7f67a8ae5e81a4d01906bfaf17cb6d48 Mon Sep 17 00:00:00 2001 From: Daniel Lange Date: Tue, 16 Feb 2021 17:07:08 +0100 Subject: [PATCH 2/2] Drop -DDEBUG (was removed in d69585b82abfdaede9e8c358982a4953c432e8d2), add -Og for make debug target --- Makefile.am | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile.am b/Makefile.am index a674e021..2b5457ca 100644 --- a/Makefile.am +++ b/Makefile.am @@ -296,10 +296,10 @@ profile: $(MAKE) all AM_CPPFLAGS="-pg -O2 -DNDEBUG" debug: - $(MAKE) all AM_CPPFLAGS="-ggdb -DDEBUG" + $(MAKE) all AM_CPPFLAGS="-ggdb3 -Og" CFLAGS="$(patsubst -O%,,$(CFLAGS))" coverage: - $(MAKE) all AM_CPPFLAGS="-fprofile-arcs -ftest-coverage -DDEBUG" AM_LDFLAGS="-lgcov" + $(MAKE) all AM_CPPFLAGS="-fprofile-arcs -ftest-coverage" AM_LDFLAGS="-lgcov" cppcheck: cppcheck -q -v . --enable=all -DHAVE_OPENVZ