94e22cd1 |
1 | #!/bin/sh |
2 | # Released under the GPL |
3 | # pmf - 2008/07/31 |
4 | |
5 | # This script runs LTTV in place in the compile directory without need for installing it with make install. |
6 | # |
7 | # The .runlttvrc file can be used to control its behavior. |
8 | # - by setting the TRACEFILE variable, a trace can be automatically loaded |
9 | # ex: TRACEFILE="-t /tmp/traces/dijkstra-20071212" |
10 | # - by setting the ARGS variable, a different set of plugins can be loaded |
11 | # for an example see the ARGS= line below |
12 | # |
13 | # In order for icons to display correctly, it might be necessary to create a symlink: |
14 | # $ ln -s ./lttv/modules/gui/lttvwindow/pixmaps |
15 | # while in the same directory as this script. |
16 | |
17 | RCFILE=".runlttvrc" |
18 | |
19 | ARGS="-L lttv/modules/gui/controlflow/.libs -m guicontrolflow -L lttv/modules/gui/lttvwindow/lttvwindow/.libs -m lttvwindow -L lttv/modules/gui/detailedevents/.libs -m guievents -L lttv/modules/gui/tracecontrol/.libs -m guitracecontrol -L lttv/modules/gui/statistics/.libs -m guistatistics -L lttv/modules/gui/resourceview/.libs -m resourceview -L lttv/modules/gui/filter/.libs -m guifilter -L lttv/modules/gui/interrupts/.libs -m interrupts -L lttv/modules/gui/histogram/.libs -m guihistogram" |
20 | |
21 | if [ -e "$RCFILE" ]; then |
22 | source "$RCFILE"; |
23 | fi |
24 | |
25 | if [ "$1" = "dbg" ]; then |
26 | LD_LIBRARY_PATH=ltt/.libs gdb --args lttv/lttv/.libs/lttv.real $ARGS $TRACEFILE |
27 | elif [ "$1" = "valgrind" ]; then |
28 | LD_LIBRARY_PATH=ltt/.libs valgrind lttv/lttv/.libs/lttv.real $ARGS $TRACEFILE |
29 | elif [ "$1" = "strace" ]; then |
30 | LD_LIBRARY_PATH=ltt/.libs strace lttv/lttv/.libs/lttv.real $ARGS $TRACEFILE |
31 | else |
32 | LD_LIBRARY_PATH=ltt/.libs lttv/lttv/.libs/lttv.real $ARGS $TRACEFILE |
33 | fi |