aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2016-09-27 18:09:34 +0200
committerSverker Eriksson <[email protected]>2016-09-27 18:09:34 +0200
commitee80c779c3ae7900e183c98f2568d386e03e3b66 (patch)
tree7f917d1d8423c79d64b5d89efe10d83ec7403d5f
parentcf78babce57e93ad733cd51c3f4891c99aa9ee1e (diff)
parent8ade9adf36d2b0d55187db3e36b84365b01c4e57 (diff)
downloadotp-ee80c779c3ae7900e183c98f2568d386e03e3b66.tar.gz
otp-ee80c779c3ae7900e183c98f2568d386e03e3b66.tar.bz2
otp-ee80c779c3ae7900e183c98f2568d386e03e3b66.zip
Merge branch 'sverker/cerl-dump-macos' into maint
-rw-r--r--erts/etc/unix/cerl.src18
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