Skip to content

Commit

Permalink
Support DF command line arguments with gdb
Browse files Browse the repository at this point in the history
  • Loading branch information
suokko committed Jun 12, 2018
1 parent bbe70af commit 69b42d5
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions package/linux/dfhack
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,8 @@ setarch_arch=$(cat hack/dfhack_setarch.txt || printf i386)
case "$1" in
-g | --gdb)
shift
echo "set environment LD_LIBRARY_PATH $LD_LIBRARY_PATH" > gdbcmd.tmp
echo "set environment LD_PRELOAD $PRELOAD_LIB" >> gdbcmd.tmp
echo "set environment MALLOC_PERTURB_ 45" >> gdbcmd.tmp
echo "set startup-with-shell off" >> gdbcmd.tmp
gdb $DF_GDB_OPTS -x gdbcmd.tmp ./libs/Dwarf_Fortress "$@"
echo "set exec-wrapper env LD_LIBRARY_PATH='$LD_LIBRARY_PATH' LD_PRELOAD='$PRELOAD_LIB' MALLOC_PERTURB_=45" > gdbcmd.tmp
gdb $DF_GDB_OPTS -x gdbcmd.tmp --args ./libs/Dwarf_Fortress "$@"
rm gdbcmd.tmp
ret=$?
;;
Expand Down

0 comments on commit 69b42d5

Please sign in to comment.