diff --git a/HACKING b/HACKING index bdee483dde..e49921e81f 100644 --- a/HACKING +++ b/HACKING @@ -139,8 +139,11 @@ However, I did not find valgrind to be useful. It reported a bunch of guile bugs, some g_hash_table bugs, and then the program exited prematurely for no apparent reason. :-( -For the moment, use the suppressions in src/valgrind-gnucash.supp +For the moment, gnucash-valgrind uses the suppressions in +src/debug/valgrind/valgrind-*.supp +For valgrind-gnucash.supp, this comment was made (but is perhaps outdated +by now ?): This file needs to be cleaned up in two ways: 1/ There are a bunch of duplicate suppressions in the file. diff --git a/configure.in b/configure.in index bdf4a87edb..2862d70045 100644 --- a/configure.in +++ b/configure.in @@ -1549,7 +1549,9 @@ AC_CONFIG_FILES(po/Makefile.in src/bin/test/Makefile src/core-utils/Makefile src/calculation/Makefile - src/calculation/test/Makefile + src/calculation/test/Makefile + src/debug/Makefile + src/debug/valgrind/Makefile src/doc/Makefile src/doc/design/Makefile src/doc/xml/Makefile diff --git a/src/Makefile.am b/src/Makefile.am index 1f0d1cd666..7ca2fb0a60 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,5 +1,6 @@ NONGUI_SUBDIRS = \ libqof \ + debug \ doc \ pixmaps \ core-utils \ @@ -51,6 +52,5 @@ EXTRA_DIST = \ base-typemaps.i \ README.modules \ gnc-test-env \ - valgrind-gnucash.supp \ guile-mappings.h \ glib-compat.h diff --git a/src/bin/Makefile.am b/src/bin/Makefile.am index d4dda605ec..3661a0f846 100644 --- a/src/bin/Makefile.am +++ b/src/bin/Makefile.am @@ -57,7 +57,7 @@ gnucash-valgrind: gnucash-valgrind.in ${top_builddir}/config.status Makefile rm -f $@.tmp sed < $< > $@.tmp \ -e 's#@-BIN_DIR-@#${bindir}#g' \ - -e "s#@-TOP_SRC_DIR-@#`pwd`/${top_srcdir}#g" \ + -e "s#@-TOP_SRC_DIR-@#${abs_top_srcdir}#g" \ -e "s#@-GNUCASH_SETUP_ENV_INSTALL_NAME-@#${GNUCASH_SETUP_ENV_INSTALL_NAME}#g" \ -e "s#@-GNUCASH_BIN_INSTALL_NAME-@#${GNUCASH_BIN_INSTALL_NAME}#g" mv $@.tmp $@ diff --git a/src/bin/gnucash-valgrind.in b/src/bin/gnucash-valgrind.in index 65092eaf00..4e99f7acf5 100644 --- a/src/bin/gnucash-valgrind.in +++ b/src/bin/gnucash-valgrind.in @@ -10,13 +10,13 @@ TOP_SRC_DIR="@-TOP_SRC_DIR-@" export G_SLICE=always-malloc export G_DEBUG=gc-friendly exec valgrind -v \ - --suppressions=${TOP_SRC_DIR}/src/valgrind-gnucash.supp \ - --suppressions=${TOP_SRC_DIR}/src/valgrind-glib.supp \ - --suppressions=${TOP_SRC_DIR}/src/valgrind-libfontconfig.supp \ - --suppressions=${TOP_SRC_DIR}/src/valgrind-libgda.supp \ - --suppressions=${TOP_SRC_DIR}/src/valgrind-libguile.supp \ - --num-callers=25 \ + --suppressions=${TOP_SRC_DIR}/src/debug/valgrind/valgrind-gnucash.supp \ + --suppressions=${TOP_SRC_DIR}/src/debug/valgrind/valgrind-glib.supp \ + --suppressions=${TOP_SRC_DIR}/src/debug/valgrind/valgrind-libfontconfig.supp \ + --suppressions=${TOP_SRC_DIR}/src/debug/valgrind/valgrind-libgda.supp \ + --suppressions=${TOP_SRC_DIR}/src/debug/valgrind/valgrind-libguile.supp \ + --num-callers=25 \ --error-limit=no \ --tool=memcheck \ - --leak-check=full \ + --leak-check=full \ @-GNUCASH_BIN_INSTALL_NAME-@ "$@" diff --git a/src/debug/Makefile.am b/src/debug/Makefile.am new file mode 100644 index 0000000000..19ab052446 --- /dev/null +++ b/src/debug/Makefile.am @@ -0,0 +1,3 @@ + +SUBDIRS = \ + valgrind \ No newline at end of file diff --git a/src/debug/valgrind/Makefile.am b/src/debug/valgrind/Makefile.am new file mode 100644 index 0000000000..efcaae1b20 --- /dev/null +++ b/src/debug/valgrind/Makefile.am @@ -0,0 +1,9 @@ + +EXTRA_DIST = \ + valgrind-gdk.supp \ + valgrind-glib.supp \ + valgrind-gnucash.supp \ + valgrind-libfontconfig.supp \ + valgrind-libgda.supp \ + valgrind-libguile.supp \ + valgrind-x11.supp \ No newline at end of file diff --git a/src/valgrind-gdk.supp b/src/debug/valgrind/valgrind-gdk.supp similarity index 100% rename from src/valgrind-gdk.supp rename to src/debug/valgrind/valgrind-gdk.supp diff --git a/src/valgrind-glib.supp b/src/debug/valgrind/valgrind-glib.supp similarity index 100% rename from src/valgrind-glib.supp rename to src/debug/valgrind/valgrind-glib.supp diff --git a/src/valgrind-gnucash.supp b/src/debug/valgrind/valgrind-gnucash.supp similarity index 100% rename from src/valgrind-gnucash.supp rename to src/debug/valgrind/valgrind-gnucash.supp diff --git a/src/valgrind-libfontconfig.supp b/src/debug/valgrind/valgrind-libfontconfig.supp similarity index 100% rename from src/valgrind-libfontconfig.supp rename to src/debug/valgrind/valgrind-libfontconfig.supp diff --git a/src/valgrind-libgda.supp b/src/debug/valgrind/valgrind-libgda.supp similarity index 100% rename from src/valgrind-libgda.supp rename to src/debug/valgrind/valgrind-libgda.supp diff --git a/src/valgrind-libguile.supp b/src/debug/valgrind/valgrind-libguile.supp similarity index 100% rename from src/valgrind-libguile.supp rename to src/debug/valgrind/valgrind-libguile.supp diff --git a/src/valgrind-x11.supp b/src/debug/valgrind/valgrind-x11.supp similarity index 100% rename from src/valgrind-x11.supp rename to src/debug/valgrind/valgrind-x11.supp diff --git a/src/doc/Makefile.am b/src/doc/Makefile.am index 903e664eae..e133873108 100644 --- a/src/doc/Makefile.am +++ b/src/doc/Makefile.am @@ -7,6 +7,7 @@ EXTRA_DIST = \ README \ backup.txt \ budget.txt \ + callgrind.txt \ constderv.html \ finderv.html \ finutil.html \ @@ -26,7 +27,6 @@ EXTRA_DIST = \ netlogin.txt \ guid.txt \ qif.txt \ - valgrind.txt \ generic-druid-framework.txt \ user-prefs-howto.txt diff --git a/src/doc/valgrind.txt b/src/doc/callgrind.txt similarity index 100% rename from src/doc/valgrind.txt rename to src/doc/callgrind.txt