diff options
author | Robin Gareus <robin@gareus.org> | 2016-04-24 14:40:31 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2016-04-24 14:43:18 +0200 |
commit | d2b892a9aedbbe1e8160e1f12d5295da00566f2a (patch) | |
tree | 16ca41480ffeb30c652ccc73c8e59b9d75376d7c /gtk2_ardour/arlua | |
parent | f80c0faa24c9e22d8c122b86a11592e7151a8e7f (diff) |
add debug facilities to arlua (valgrind, callgrind) to test libardour
Diffstat (limited to 'gtk2_ardour/arlua')
-rwxr-xr-x | gtk2_ardour/arlua | 33 |
1 files changed, 31 insertions, 2 deletions
diff --git a/gtk2_ardour/arlua b/gtk2_ardour/arlua index d8cec780ec..1286f79d6a 100755 --- a/gtk2_ardour/arlua +++ b/gtk2_ardour/arlua @@ -5,14 +5,43 @@ export UBUNTU_MENUPROXY="" if [ $# -gt 0 ] ; then 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 fi -if test -z "$GDB"; then + +if test -z "$DBG"; then exec $TOP/build/tools/luadevel/luasession "$@" 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 exec gdb --args $TOP/build/tools/luadevel/luasession "$@" fi |