94e22cd1 |
1 | #!/bin/sh |
2 | # Released under the GPL |
3 | # pmf - 2008/07/31 |
4 | |
eb9ab977 |
5 | # This script runs LTTV in place in the compile directory without need for |
6 | # installing it with make install. |
94e22cd1 |
7 | # |
8 | # The .runlttvrc file can be used to control its behavior. |
9 | # - by setting the TRACEFILE variable, a trace can be automatically loaded |
10 | # ex: TRACEFILE="-t /tmp/traces/dijkstra-20071212" |
11 | # - by setting the ARGS variable, a different set of plugins can be loaded |
12 | # for an example see the ARGS= line below |
13 | # |
eb9ab977 |
14 | # In order for icons to display correctly, it might be necessary to create a |
15 | # symlink: |
94e22cd1 |
16 | # $ ln -s ./lttv/modules/gui/lttvwindow/pixmaps |
17 | # while in the same directory as this script. |
18 | |
19 | RCFILE=".runlttvrc" |
20 | |
21 | 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" |
f034e1cb |
22 | LTTV_EXEC="lttv/lttv/.libs/lttv.real" |
23 | |
24 | if [ ! -e "$LTTV_EXEC" ]; then |
25 | echo "error: LTTV should be compiled before running this script." >/dev/stderr |
26 | exit 1 |
27 | fi |
94e22cd1 |
28 | |
29 | if [ -e "$RCFILE" ]; then |
30 | source "$RCFILE"; |
31 | fi |
32 | |
33 | if [ "$1" = "dbg" ]; then |
f034e1cb |
34 | LD_LIBRARY_PATH=ltt/.libs gdb --args $LTTV_EXEC $ARGS $TRACEFILE |
94e22cd1 |
35 | elif [ "$1" = "valgrind" ]; then |
f034e1cb |
36 | LD_LIBRARY_PATH=ltt/.libs valgrind $LTTV_EXEC $ARGS $TRACEFILE |
94e22cd1 |
37 | elif [ "$1" = "strace" ]; then |
f034e1cb |
38 | LD_LIBRARY_PATH=ltt/.libs strace $LTTV_EXEC $ARGS $TRACEFILE |
94e22cd1 |
39 | else |
f034e1cb |
40 | LD_LIBRARY_PATH=ltt/.libs $LTTV_EXEC $ARGS $TRACEFILE |
94e22cd1 |
41 | fi |