Use 'setarch i386 -R' on linux to be usre that ASLR won't break things.

develop
Petr Mrázek 2011-08-09 20:38:47 +02:00
parent edb2a14c51
commit c423bb6e88
1 changed files with 4 additions and 4 deletions

@ -45,21 +45,21 @@ case "$1" in
;; ;;
-h | --helgrind) -h | --helgrind)
shift shift
LD_PRELOAD=./libdfhack.so valgrind $DF_HELGRIND_OPTS --tool=helgrind --log-file=helgrind.log ./libs/Dwarf_Fortress $* LD_PRELOAD=./libdfhack.so setarch i386 -R valgrind $DF_HELGRIND_OPTS --tool=helgrind --log-file=helgrind.log ./libs/Dwarf_Fortress $*
ret=$? ret=$?
;; ;;
-v | --valgrind) -v | --valgrind)
shift shift
LD_PRELOAD=./libdfhack.so valgrind $DF_VALGRIND_OPTS --log-file=valgrind.log ./libs/Dwarf_Fortress $* LD_PRELOAD=./libdfhack.so setarch i386 -R valgrind $DF_VALGRIND_OPTS --log-file=valgrind.log ./libs/Dwarf_Fortress $*
ret=$? ret=$?
;; ;;
-c | --callgrind) -c | --callgrind)
shift shift
LD_PRELOAD=./libdfhack.so valgrind $DF_CALLGRIND_OPTS --tool=callgrind --separate-threads=yes --dump-instr=yes --instr-atstart=no --log-file=callgrind.log ./libs/Dwarf_Fortress $* LD_PRELOAD=./libdfhack.so setarch i386 -R valgrind $DF_CALLGRIND_OPTS --tool=callgrind --separate-threads=yes --dump-instr=yes --instr-atstart=no --log-file=callgrind.log ./libs/Dwarf_Fortress $*
ret=$? ret=$?
;; ;;
*) *)
LD_PRELOAD=./libdfhack.so ./libs/Dwarf_Fortress $* LD_PRELOAD=./libdfhack.so setarch i386 -R ./libs/Dwarf_Fortress $*
ret=$? ret=$?
;; ;;
esac esac