Add strace support to the linux dfhack script

develop
Pauli 2018-06-12 20:42:12 +03:00
parent 40d0d946a4
commit bbe70afa2d
1 changed files with 5 additions and 0 deletions

@ -91,6 +91,11 @@ case "$1" in
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 ./libs/Dwarf_Fortress "$@"
ret=$?
;;
--strace)
shift
strace -f setarch "$setarch_arch" -R env LD_PRELOAD="$PRELOAD_LIB" ./libs/Dwarf_Fortress "$@" 2> strace.log
ret=$?
;;
*)
setarch "$setarch_arch" -R env LD_PRELOAD="$PRELOAD_LIB" ./libs/Dwarf_Fortress "$@"
ret=$?