Skip to content

Commit

Permalink
Merge branch 'maint'
Browse files Browse the repository at this point in the history
  • Loading branch information
sverker committed Oct 14, 2024
2 parents a4a6c80 + e81c275 commit cea856a
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions erts/etc/unix/cerl.src
Original file line number Diff line number Diff line change
Expand Up @@ -438,23 +438,24 @@ elif [ "x$GDB" = "xgdb" ]; then
case "x$core" in
x)
# Get emu args to use from erlexec...
beam_args=`$EXEC -emu_args_exit $xargs ${1+"$@"}`
gdbcmd="--args $EMU_NAME $beam_args"
beam_args=`$EXEC -emu_args_exit $xargs ${1+"$@"} | sed 's/"/\\\\"/g' | tr '\n' ' '`
gdbcmd="set args $beam_args"
;;
x/*)
gdbcmd="$EMU_NAME ${core}"
gdbcmd="core ${core}"
GDBBP=
;;
*)
dir=`pwd`
gdbcmd="$EMU_NAME ${dir}/${core}"
gdbcmd="core `pwd`/${core}"
GDBBP=
;;
esac
# Fire up gdb
cmdfile="/tmp/.cerlgdb.$$"
echo "source $ROOTDIR/erts/etc/unix/etp-commands" > $cmdfile
# Fire up gdb in emacs...
exec gdb $GDBBP -x $cmdfile $gdbcmd
echo "file $BINDIR/$EMU_NAME" > $cmdfile
echo "$gdbcmd" >> $cmdfile
echo "source $ROOTDIR/erts/etc/unix/etp-commands" >> $cmdfile
exec gdb $GDBBP -x $cmdfile
elif [ "x$GDB" = "xlldb" ]; then
case "x$core" in
x)
Expand All @@ -481,11 +482,11 @@ elif [ "x$GDB" = "xegdb" ]; then
gdbcmd="set args $beam_args"
;;
x/*)
gdbcmd="core $core"
gdbcmd="core ${core}"
GDBBP=
;;
*)
gdbcmd="core `pwd`/$core"
gdbcmd="core `pwd`/${core}"
GDBBP=
;;
esac
Expand Down

0 comments on commit cea856a

Please sign in to comment.