-if [ -n "$dbg" ]; then
- LD_LIBRARY_PATH=ltt/.libs gdb --args $LTTV_EXEC $ARGS $TRACEFILE
-elif [ -n "$valgrind" ]; then
- LD_LIBRARY_PATH=ltt/.libs valgrind --track-origins=yes --show-reachable=yes --leak-check=full --error-limit=no $LTTV_EXEC $ARGS $TRACEFILE
-elif [ -n "$strace" ]; then
- LD_LIBRARY_PATH=ltt/.libs strace $LTTV_EXEC $ARGS $TRACEFILE
+LTTV_ARGS="$BOPTIONS $LIBS $TRACEFILES $AOPTIONS"
+if [ "$HELPER" = "gdb" ]; then
+ LD_LIBRARY_PATH=ltt/.libs gdb --args $LTTV_EXEC $LTTV_ARGS
+elif [ "$HELPER" = "valgrind" ]; then
+ LD_LIBRARY_PATH=ltt/.libs valgrind --track-origins=yes --show-reachable=yes --leak-check=full --error-limit=no $LTTV_EXEC $LTTV_ARGS
+elif [ "$HELPER" = "massif" ]; then
+ LD_LIBRARY_PATH=ltt/.libs valgrind --tool=massif $LTTV_EXEC $LTTV_ARGS
+elif [ "$HELPER" = "strace" ]; then
+ LD_LIBRARY_PATH=ltt/.libs strace $LTTV_EXEC $LTTV_ARGS