diff options
author | Sverker Eriksson <[email protected]> | 2016-09-23 15:11:08 +0200 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2016-09-23 15:11:08 +0200 |
commit | 8ade9adf36d2b0d55187db3e36b84365b01c4e57 (patch) | |
tree | 73e15c9655af0e790840781f4a47e447baace641 | |
parent | 3f3f25b23379b1afb15cc97462cf5d385690f5a0 (diff) | |
download | otp-8ade9adf36d2b0d55187db3e36b84365b01c4e57.tar.gz otp-8ade9adf36d2b0d55187db3e36b84365b01c4e57.tar.bz2 otp-8ade9adf36d2b0d55187db3e36b84365b01c4e57.zip |
erts: Make cerl -dump core work on mac
-rw-r--r-- | erts/etc/unix/cerl.src | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/erts/etc/unix/cerl.src b/erts/etc/unix/cerl.src index c5422ab2ed..30f2d831b5 100644 --- a/erts/etc/unix/cerl.src +++ b/erts/etc/unix/cerl.src @@ -399,19 +399,29 @@ elif [ "x$GDB" = "xdump" ]; then cmdfile="/tmp/.cerlgdb.$$" case "x$core" in x/*) - gdbcmd="$EMU_NAME ${core}" ;; *) dir=`pwd` - gdbcmd="$EMU_NAME ${dir}/${core}" + core="${dir}/${core}" ;; esac - echo "set width 0 + case `uname` in + Darwin) + echo " +thread backtrace all +quit +" > $cmdfile + exec lldb -s $cmdfile -c ${core} $EMU_NAME + ;; + *) + echo "set width 0 set height 0 set verbose off source $ROOTDIR/erts/etc/unix/etp-commands thread apply all bt " > $cmdfile - exec gdb --batch --command=$cmdfile $gdbcmd + exec gdb --batch --command=$cmdfile $EMU_NAME $core + ;; + esac fi |