13
0

add debug facilities to arlua (valgrind, callgrind) to test libardour

This commit is contained in:
Robin Gareus 2016-04-24 14:40:31 +02:00
parent f80c0faa24
commit d2b892a9ae

View File

@ -5,14 +5,43 @@ export UBUNTU_MENUPROXY=""
if [ $# -gt 0 ] ; then if [ $# -gt 0 ] ; then
case $1 in case $1 in
-g|--gdb) GDB=gdb; shift ;; -g|--gdb) DBG=gdb; shift ;;
esac
case $1 in
--valgrind) DBG=valgrind; shift ;;
esac
case $1 in
--callgrind) DBG=callgrind; shift ;;
esac esac
fi fi
if test -z "$GDB"; then
if test -z "$DBG"; then
exec $TOP/build/tools/luadevel/luasession "$@" exec $TOP/build/tools/luadevel/luasession "$@"
fi fi
if test "$DBG" = "valgrind"; then
export ARDOUR_RUNNING_UNDER_VALGRIND=TRUE
exec valgrind \
--error-limit=no --num-callers=50 \
--tool=memcheck \
--track-origins=yes \
--leak-check=full --show-leak-kinds=all \
--suppressions=${TOP}/tools/valgrind.supp \
$TOP/build/tools/luadevel/luasession "$@"
fi
if test "$DBG" = "callgrind"; then
exec valgrind \
--error-limit=no --num-callers=50 \
--tool=callgrind \
--separate-callers=3 \
--separate-threads=yes \
--collect-systime=yes \
--collect-jumps=yes \
$TOP/build/tools/luadevel/luasession "$@"
fi
if test -n "`which gdb`"; then if test -n "`which gdb`"; then
exec gdb --args $TOP/build/tools/luadevel/luasession "$@" exec gdb --args $TOP/build/tools/luadevel/luasession "$@"
fi fi