runlttv: enhance
authorPierre-Marc Fournier <pierre-marc.fournier@polymtl.ca>
Fri, 24 Jul 2009 18:24:50 +0000 (14:24 -0400)
committerPierre-Marc Fournier <pierre-marc.fournier@polymtl.ca>
Fri, 24 Jul 2009 18:24:50 +0000 (14:24 -0400)
runlttv

diff --git a/runlttv b/runlttv
index 60fe83b53572fd6d11273ec9b1962f3f8f5c086c..82296c3e50df15b7a6284fc14b1ee6cd4eb213fe 100755 (executable)
--- a/runlttv
+++ b/runlttv
@@ -10,6 +10,7 @@
 #     ex: TRACEFILE="-t /tmp/traces/dijkstra-20071212"
 # - by setting the ARGS variable, a different set of plugins can be loaded
 #     for an example see the ARGS= line below
+# - the LTTV_ARGS environment variable may be used to add additional arguments to lttv
 #
 # In order for icons to display correctly, it might be necessary to create a
 # symlink:
@@ -26,15 +27,23 @@ if [ ! -e "$LTTV_EXEC" ]; then
        exit 1
 fi
 
+for a in $@; do
+       eval $(echo $a)"=1"
+done
+
 if [ -e "$RCFILE" ]; then
        source "$RCFILE";
 fi
 
-if [ "$1" = "dbg" ]; then
+ARGS="$ARGS $LTTV_ARGS"
+
+echo $dbg
+
+if [ -n "$dbg" ]; then
        LD_LIBRARY_PATH=ltt/.libs gdb --args $LTTV_EXEC $ARGS $TRACEFILE
-elif [ "$1" = "valgrind" ]; then
-       LD_LIBRARY_PATH=ltt/.libs valgrind $LTTV_EXEC $ARGS $TRACEFILE
-elif [ "$1" = "strace" ]; then
+elif [ -n "$valgrind" ]; then
+       LD_LIBRARY_PATH=ltt/.libs valgrind --show-reachable=yes --leak-check=full $LTTV_EXEC $ARGS $TRACEFILE
+elif [ -n "$strace" ]; then
        LD_LIBRARY_PATH=ltt/.libs strace $LTTV_EXEC $ARGS $TRACEFILE
 else
        LD_LIBRARY_PATH=ltt/.libs $LTTV_EXEC $ARGS $TRACEFILE
This page took 0.024026 seconds and 4 git commands to generate.