diff options
author | Lukas Larsson <[email protected]> | 2013-06-03 18:16:00 +0200 |
---|---|---|
committer | Lukas Larsson <[email protected]> | 2013-06-03 18:16:00 +0200 |
commit | 4a6e9afa8762e3f05ae081bafb02b0c5f2ac22bf (patch) | |
tree | e26830cd3079a12db9260dac8573d0b88a1d0e15 /erts | |
parent | 8bd1897dac5e2774a6fce56de61b169bd7267bbf (diff) | |
parent | 1b7d29ce5d0f6ed4e087d9a5936834b442fd769d (diff) | |
download | otp-4a6e9afa8762e3f05ae081bafb02b0c5f2ac22bf.tar.gz otp-4a6e9afa8762e3f05ae081bafb02b0c5f2ac22bf.tar.bz2 otp-4a6e9afa8762e3f05ae081bafb02b0c5f2ac22bf.zip |
Merge branch 'maint'
* maint:
Add rcore and rgdb to cerl
Diffstat (limited to 'erts')
-rw-r--r-- | erts/etc/unix/cerl.src | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/erts/etc/unix/cerl.src b/erts/etc/unix/cerl.src index f99059cb72..691b32e143 100644 --- a/erts/etc/unix/cerl.src +++ b/erts/etc/unix/cerl.src @@ -31,6 +31,8 @@ # -debug Run debug compiled emulator # -gdb Run the debug compiled emulator in emacs and gdb. # You have to start beam in gdb using "run". +# -rgdb Run the debug compiled emulator in gdb. +# You have to start beam in gdb using "run". # -break F Run the debug compiled emulator in emacs and gdb and set break. # The session is started, i.e. "run" is already don for you. # -xxgdb FIXME currently disabled @@ -178,6 +180,10 @@ while [ $# -gt 0 ]; do ;; "-gdb") shift + GDB=egdb + ;; + "-rgdb") + shift GDB=gdb ;; "-break") @@ -188,6 +194,12 @@ while [ $# -gt 0 ]; do ;; "-core") shift + GDB=egdb + core="$1" + shift + ;; + "-rcore") + shift GDB=gdb core="$1" shift @@ -285,6 +297,27 @@ if [ "x$GDB" = "x" ]; then else exec $EXEC $eeargs $xargs ${1+"$@"} fi +elif [ "x$GDB" = "xgdb" ]; then + case "x$core" in + x) + # Get emu args to use from erlexec... + beam_args=`$EXEC -emu_args_exit ${1+"$@"}` + gdbcmd="--args $EMU_NAME $beam_args" + ;; + x/*) + gdbcmd="$EMU_NAME ${core}" + GDBBP= + ;; + *) + dir=`pwd` + gdbcmd="$EMU_NAME ${dir}/${core}" + GDBBP= + ;; + esac + cmdfile="/tmp/.cerlgdb.$$" + echo "source $ROOTDIR/erts/etc/unix/etp-commands" > $cmdfile + # Fire up gdb in emacs... + exec gdb $GDBBP -x $cmdfile $gdbcmd else if [ "x$EMACS" = "x" ]; then EMACS=emacs |