Fixed bug with "--disable-lttv-gui" flags.
[lttv.git] / runlttv
diff --git a/runlttv b/runlttv
index 983b50cb177227217d740091f643fae42e5c6284..ceb6349b8c78e4d68d3091c1c16f8a7a76d6d451 100755 (executable)
--- a/runlttv
+++ b/runlttv
@@ -13,7 +13,6 @@
 #     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:
 
 RCFILE=".runlttvrc"
 
-ARGS=\
-"-L lttv/modules/gui/lttvwindow/lttvwindow/.libs -m lttvwindow "\
+if [ "$MODE" = "text" ]; then
+       ARGS="-L lttv/modules/text/.libs -m textDump"
+else
+       ARGS="-L lttv/modules/gui/lttvwindow/lttvwindow/.libs -m lttvwindow "\
 "-L lttv/modules/gui/controlflow/.libs -m guicontrolflow "\
 "-L lttv/modules/gui/detailedevents/.libs -m guievents "\
 "-L lttv/modules/gui/tracecontrol/.libs -m guitracecontrol "\
@@ -32,6 +33,7 @@ ARGS=\
 "-L lttv/modules/gui/filter/.libs -m guifilter "\
 "-L lttv/modules/gui/interrupts/.libs -m interrupts "\
 "-L lttv/modules/gui/histogram/.libs -m guihistogram"
+fi
 
 if [ -e "lttv/lttv/.libs/lttv.real" ]; then
        LTTV_EXEC="lttv/lttv/.libs/lttv.real"
@@ -42,10 +44,6 @@ else
        exit 1
 fi
 
-for a in $@; do
-       eval $(echo $a)"=1"
-done
-
 if [ -n "$TF" ]; then
        TRACEFILE="-t $TF"
 fi
@@ -54,14 +52,19 @@ if [ -e "$RCFILE" ]; then
        source "$RCFILE";
 fi
 
-ARGS="$ARGS $LTTV_ARGS"
-
-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
+HELPER=$1
+if [ "$HELPER" = "gdb" ]; then
+       shift
+       LD_LIBRARY_PATH=ltt/.libs gdb --args $LTTV_EXEC $ARGS $TRACEFILE $@
+elif [ "$HELPER" = "valgrind" ]; then
+       shift
+       LD_LIBRARY_PATH=ltt/.libs valgrind --track-origins=yes --show-reachable=yes --leak-check=full --error-limit=no $LTTV_EXEC $ARGS $TRACEFILE $@
+elif [ "$HELPER" = "massif" ]; then
+       shift
+       LD_LIBRARY_PATH=ltt/.libs valgrind --tool=massif $LTTV_EXEC $ARGS $TRACEFILE $@
+elif [ "$HELPER" = "strace" ]; then
+       shift
+       LD_LIBRARY_PATH=ltt/.libs strace $LTTV_EXEC $ARGS $TRACEFILE $@
 else
-       LD_LIBRARY_PATH=ltt/.libs $LTTV_EXEC $ARGS $TRACEFILE
+       LD_LIBRARY_PATH=ltt/.libs $LTTV_EXEC $ARGS $TRACEFILE $@
 fi
This page took 0.023589 seconds and 4 git commands to generate.