Use valgrind if it's available.
This commit is contained in:
parent
fa81dc4798
commit
0c10d1c3fd
4 changed files with 20 additions and 5 deletions
|
|
@ -238,8 +238,10 @@ fullcheck: UnitTests
|
||||||
MallocGuardEdges=1 \
|
MallocGuardEdges=1 \
|
||||||
MallocScribble=1 \
|
MallocScribble=1 \
|
||||||
MallocPreScribble=1 \
|
MallocPreScribble=1 \
|
||||||
|
MallocCheckHeapStart=100 \
|
||||||
|
MallocCheckHeapEach=100 \
|
||||||
DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib \
|
DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib \
|
||||||
$(top_builddir)/UnitTests --verify
|
$(srcdir)/valgrind.sh $(top_builddir)/UnitTests --verify
|
||||||
|
|
||||||
######################################################################
|
######################################################################
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1862,8 +1862,10 @@ fullcheck: UnitTests
|
||||||
MallocGuardEdges=1 \
|
MallocGuardEdges=1 \
|
||||||
MallocScribble=1 \
|
MallocScribble=1 \
|
||||||
MallocPreScribble=1 \
|
MallocPreScribble=1 \
|
||||||
|
MallocCheckHeapStart=100 \
|
||||||
|
MallocCheckHeapEach=100 \
|
||||||
DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib \
|
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
|
alldocs: docs/ledger.info docs/ledger.pdf doxygen-docs
|
||||||
|
|
||||||
|
|
|
||||||
8
acprep
8
acprep
|
|
@ -11,8 +11,10 @@ PYTHON_HOME="/Library/Frameworks/Python.framework/Versions/2.5"
|
||||||
# linker flags for all the various build permutations I use for
|
# linker flags for all the various build permutations I use for
|
||||||
# testing and profiling.
|
# testing and profiling.
|
||||||
|
|
||||||
if which glibtoolize > /dev/null 2>&1; then
|
LIBTOOLIZE=$(which glibtoolize 2>&1)
|
||||||
glibtoolize --automake -f -c
|
|
||||||
|
if [ -x "$LIBTOOLIZE" ]; then
|
||||||
|
"$LIBTOOLIZE" --automake -f -c
|
||||||
else
|
else
|
||||||
libtoolize --automake -f -c
|
libtoolize --automake -f -c
|
||||||
fi
|
fi
|
||||||
|
|
@ -63,7 +65,7 @@ while [ -n "$1" ]; do
|
||||||
# CPPFLAGS="-I/usr/local/include/stlport $CPPFLAGS"
|
# CPPFLAGS="-I/usr/local/include/stlport $CPPFLAGS"
|
||||||
# LIBS="$LIBS -lstlportstlg"
|
# LIBS="$LIBS -lstlportstlg"
|
||||||
#fi
|
#fi
|
||||||
CPPFLAGS="$CPPFLAGS -D_GLIBCXX_DEBUG=1" ;;
|
CPPFLAGS="$CPPFLAGS -D_GLIBCXX_DEBUG=1"
|
||||||
CXXFLAGS="$CXXFLAGS -g" ;;
|
CXXFLAGS="$CXXFLAGS -g" ;;
|
||||||
|
|
||||||
--prof | --perf)
|
--prof | --perf)
|
||||||
|
|
|
||||||
9
valgrind.sh
Executable file
9
valgrind.sh
Executable 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
|
||||||
Loading…
Add table
Reference in a new issue