2 # Released under the GPL
5 # This script runs LTTV in place in the compile directory without need for
6 # installing it with make install.
8 # In order for icons to display correctly, it might be necessary to create a
10 # $ ln -s ./lttv/modules/gui/lttvwindow/pixmaps
11 # while in the same directory as this script.
14 RCFILE
="$(dirname $0)/.runlttvrc"
15 TEXTLIBS
="-L lttv/modules/text/.libs -m textDump"
16 GRAPHLIBS
="-L lttv/modules/gui/lttvwindow/lttvwindow/.libs -m lttvwindow "\
17 "-L lttv/modules/gui/controlflow/.libs -m guicontrolflow "\
18 "-L lttv/modules/gui/detailedevents/.libs -m guievents "\
19 "-L lttv/modules/gui/tracecontrol/.libs -m guitracecontrol "\
20 "-L lttv/modules/gui/statistics/.libs -m guistatistics "\
21 "-L lttv/modules/gui/resourceview/.libs -m resourceview "\
22 "-L lttv/modules/gui/filter/.libs -m guifilter "\
23 "-L lttv/modules/gui/interrupts/.libs -m interrupts "\
24 "-L lttv/modules/gui/histogram/.libs -m guihistogram"
28 echo "Usage: $0 [OPTION]... [TRACE]..." >/dev
/stderr
30 echo "Options:" >/dev
/stderr
31 printf "\t-m MODE Output mode (modes: text, gui)" >/dev
/stderr
32 printf "\t-H HELPER Invoke LTTV through a helper program" >/dev
/stderr
33 printf "\t (helpers: gdb, valgrind, massif, strace)" >/dev
/stderr
34 printf "\t-b OPTIONS LTTV options to specify before the module list" >/dev
/stderr
35 printf "\t-a OPTIONS LTTV options to specify after the module list" >/dev
/stderr
39 if [ -e "lttv/lttv/.libs/lttv.real" ]; then
40 LTTV_EXEC
="lttv/lttv/.libs/lttv.real"
41 elif [ -e "lttv/lttv/lttv.real" ]; then
42 LTTV_EXEC
="lttv/lttv/lttv.real"
44 echo "error: LTTV should be compiled before running this script." >/dev
/stderr
48 while getopts "H:m:b:a:h" options
; do
52 b
) BOPTIONS
="$BOPTIONS $OPTARG";;
53 a
) AOPTIONS
="$AOPTIONS $OPTARG";;
60 shift $
(($OPTIND - 1))
64 TRACEFILES
="$TRACEFILES -t $trace "
67 if [ -e "$RCFILE" ]; then
71 if [ -z "$MODE" ]; then
75 if [ "$MODE" = "text" ]; then
77 elif [ "$MODE" = "gui" ]; then
80 echo "$PROGNAME: unknown mode -- $MODE" >/dev
/stderr
84 LTTV_ARGS
="$BOPTIONS $LIBS $TRACEFILES $AOPTIONS"
85 if [ "$HELPER" = "gdb" ]; then
86 LD_LIBRARY_PATH
=ltt
/.libs gdb
--args $LTTV_EXEC $LTTV_ARGS
87 elif [ "$HELPER" = "valgrind" ]; then
88 LD_LIBRARY_PATH
=ltt
/.libs valgrind
--track-origins=yes --show-reachable=yes --leak-check=full
--error-limit=no
$LTTV_EXEC $LTTV_ARGS
89 elif [ "$HELPER" = "massif" ]; then
90 LD_LIBRARY_PATH
=ltt
/.libs valgrind
--tool=massif
$LTTV_EXEC $LTTV_ARGS
91 elif [ "$HELPER" = "strace" ]; then
92 LD_LIBRARY_PATH
=ltt
/.libs strace
$LTTV_EXEC $LTTV_ARGS
94 LD_LIBRARY_PATH
=ltt
/.libs
$LTTV_EXEC $LTTV_ARGS
This page took 0.031807 seconds and 4 git commands to generate.