Use valgrind if it's available.

This commit is contained in:
John Wiegley 2007-05-08 03:12:29 +00:00
parent fa81dc4798
commit 0c10d1c3fd
4 changed files with 20 additions and 5 deletions

View file

@ -238,8 +238,10 @@ fullcheck: UnitTests
MallocGuardEdges=1 \
MallocScribble=1 \
MallocPreScribble=1 \
MallocCheckHeapStart=100 \
MallocCheckHeapEach=100 \
DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib \
$(top_builddir)/UnitTests --verify
$(srcdir)/valgrind.sh $(top_builddir)/UnitTests --verify
######################################################################

View file

@ -1862,8 +1862,10 @@ fullcheck: UnitTests
MallocGuardEdges=1 \
MallocScribble=1 \
MallocPreScribble=1 \
MallocCheckHeapStart=100 \
MallocCheckHeapEach=100 \
DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib \
$(top_builddir)/UnitTests --verify
$(srcdir)/valgrind.sh $(top_builddir)/UnitTests --verify
alldocs: docs/ledger.info docs/ledger.pdf doxygen-docs

8
acprep
View file

@ -11,8 +11,10 @@ PYTHON_HOME="/Library/Frameworks/Python.framework/Versions/2.5"
# linker flags for all the various build permutations I use for
# testing and profiling.
if which glibtoolize > /dev/null 2>&1; then
glibtoolize --automake -f -c
LIBTOOLIZE=$(which glibtoolize 2>&1)
if [ -x "$LIBTOOLIZE" ]; then
"$LIBTOOLIZE" --automake -f -c
else
libtoolize --automake -f -c
fi
@ -63,7 +65,7 @@ while [ -n "$1" ]; do
# CPPFLAGS="-I/usr/local/include/stlport $CPPFLAGS"
# LIBS="$LIBS -lstlportstlg"
#fi
CPPFLAGS="$CPPFLAGS -D_GLIBCXX_DEBUG=1" ;;
CPPFLAGS="$CPPFLAGS -D_GLIBCXX_DEBUG=1"
CXXFLAGS="$CXXFLAGS -g" ;;
--prof | --perf)

9
valgrind.sh Executable file
View file

@ -0,0 +1,9 @@
#!/bin/bash
VALGRIND=$(which valgrind 2>&1)
if [ -x "$VALGRIND" ]; then
exec "$VALGRIND" --leak-check=full --show-reachable=yes "$@"
else
exec "$@"
fi