|
|
@ -60,7 +60,7 @@ fi
|
|
|
|
case "$1" in
|
|
|
|
case "$1" in
|
|
|
|
-g | --gdb)
|
|
|
|
-g | --gdb)
|
|
|
|
shift
|
|
|
|
shift
|
|
|
|
echo "set exec-wrapper env LD_LIBRARY_PATH='$LD_LIBRARY_PATH' LD_PRELOAD='$PRELOAD_LIB' MALLOC_PERTURB_=45" > gdbcmd.tmp
|
|
|
|
echo "set exec-wrapper env LD_LIBRARY_PATH='$LD_LIBRARY_PATH' LD_PRELOAD='${LD_PRELOAD:+$LD_PRELOAD:}$PRELOAD_LIB' MALLOC_PERTURB_=45" > gdbcmd.tmp
|
|
|
|
gdb $DF_GDB_OPTS -x gdbcmd.tmp --args ./dwarfort "$@"
|
|
|
|
gdb $DF_GDB_OPTS -x gdbcmd.tmp --args ./dwarfort "$@"
|
|
|
|
rm gdbcmd.tmp
|
|
|
|
rm gdbcmd.tmp
|
|
|
|
ret=$?
|
|
|
|
ret=$?
|
|
|
@ -95,35 +95,35 @@ case "$1" in
|
|
|
|
;;
|
|
|
|
;;
|
|
|
|
-h | --helgrind)
|
|
|
|
-h | --helgrind)
|
|
|
|
shift
|
|
|
|
shift
|
|
|
|
LD_PRELOAD="$PRELOAD_LIB" setarch "$setarch_arch" -R valgrind $DF_HELGRIND_OPTS --tool=helgrind --log-file=helgrind.log ./dwarfort "$@"
|
|
|
|
LD_PRELOAD="${LD_PRELOAD:+$LD_PRELOAD:}$PRELOAD_LIB" setarch "$setarch_arch" -R valgrind $DF_HELGRIND_OPTS --tool=helgrind --log-file=helgrind.log ./dwarfort "$@"
|
|
|
|
ret=$?
|
|
|
|
ret=$?
|
|
|
|
;;
|
|
|
|
;;
|
|
|
|
-v | --valgrind)
|
|
|
|
-v | --valgrind)
|
|
|
|
shift
|
|
|
|
shift
|
|
|
|
LD_PRELOAD="$PRELOAD_LIB" setarch "$setarch_arch" -R valgrind $DF_VALGRIND_OPTS --log-file=valgrind.log ./dwarfort "$@"
|
|
|
|
LD_PRELOAD="${LD_PRELOAD:+$LD_PRELOAD:}$PRELOAD_LIB" setarch "$setarch_arch" -R valgrind $DF_VALGRIND_OPTS --log-file=valgrind.log ./dwarfort "$@"
|
|
|
|
ret=$?
|
|
|
|
ret=$?
|
|
|
|
;;
|
|
|
|
;;
|
|
|
|
-c | --callgrind)
|
|
|
|
-c | --callgrind)
|
|
|
|
shift
|
|
|
|
shift
|
|
|
|
LD_PRELOAD="$PRELOAD_LIB" setarch "$setarch_arch" -R valgrind $DF_CALLGRIND_OPTS --tool=callgrind --separate-threads=yes --dump-instr=yes --instr-atstart=no --log-file=callgrind.log ./dwarfort "$@"
|
|
|
|
LD_PRELOAD="${LD_PRELOAD:+$LD_PRELOAD:}$PRELOAD_LIB" setarch "$setarch_arch" -R valgrind $DF_CALLGRIND_OPTS --tool=callgrind --separate-threads=yes --dump-instr=yes --instr-atstart=no --log-file=callgrind.log ./dwarfort "$@"
|
|
|
|
ret=$?
|
|
|
|
ret=$?
|
|
|
|
;;
|
|
|
|
;;
|
|
|
|
--strace)
|
|
|
|
--strace)
|
|
|
|
shift
|
|
|
|
shift
|
|
|
|
strace -f setarch "$setarch_arch" -R env LD_PRELOAD="$PRELOAD_LIB" ./dwarfort "$@" 2> strace.log
|
|
|
|
strace -f setarch "$setarch_arch" -R env LD_PRELOAD="${LD_PRELOAD:+$LD_PRELOAD:}$PRELOAD_LIB" ./dwarfort "$@" 2> strace.log
|
|
|
|
ret=$?
|
|
|
|
ret=$?
|
|
|
|
;;
|
|
|
|
;;
|
|
|
|
-x | --exec)
|
|
|
|
-x | --exec)
|
|
|
|
exec setarch "$setarch_arch" -R env LD_PRELOAD="$PRELOAD_LIB" ./dwarfort "$@"
|
|
|
|
exec setarch "$setarch_arch" -R env LD_PRELOAD="${LD_PRELOAD:+$LD_PRELOAD:}$PRELOAD_LIB" ./dwarfort "$@"
|
|
|
|
# script does not resume
|
|
|
|
# script does not resume
|
|
|
|
;;
|
|
|
|
;;
|
|
|
|
--sc | --sizecheck)
|
|
|
|
--sc | --sizecheck)
|
|
|
|
PRELOAD_LIB="${PRELOAD_LIB:+$PRELOAD_LIB:}./hack/libsizecheck.so"
|
|
|
|
PRELOAD_LIB="${PRELOAD_LIB:+$PRELOAD_LIB:}./hack/libsizecheck.so"
|
|
|
|
MALLOC_PERTURB_=45 setarch "$setarch_arch" -R env LD_PRELOAD="$PRELOAD_LIB" ./dwarfort "$@"
|
|
|
|
MALLOC_PERTURB_=45 setarch "$setarch_arch" -R env LD_PRELOAD="${LD_PRELOAD:+$LD_PRELOAD:}$PRELOAD_LIB" ./dwarfort "$@"
|
|
|
|
ret=$?
|
|
|
|
ret=$?
|
|
|
|
;;
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
*)
|
|
|
|
setarch "$setarch_arch" -R env LD_PRELOAD="$PRELOAD_LIB" ./dwarfort "$@"
|
|
|
|
setarch "$setarch_arch" -R env LD_PRELOAD="${LD_PRELOAD:+$LD_PRELOAD:}$PRELOAD_LIB" ./dwarfort "$@"
|
|
|
|
ret=$?
|
|
|
|
ret=$?
|
|
|
|
;;
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
esac
|
|
|
|