aboutsummaryrefslogtreecommitdiffstats
path: root/erts/etc/unix
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2016-09-23 15:11:08 +0200
committerSverker Eriksson <[email protected]>2016-09-23 15:11:08 +0200
commit8ade9adf36d2b0d55187db3e36b84365b01c4e57 (patch)
tree73e15c9655af0e790840781f4a47e447baace641 /erts/etc/unix
parent3f3f25b23379b1afb15cc97462cf5d385690f5a0 (diff)
downloadotp-8ade9adf36d2b0d55187db3e36b84365b01c4e57.tar.gz
otp-8ade9adf36d2b0d55187db3e36b84365b01c4e57.tar.bz2
otp-8ade9adf36d2b0d55187db3e36b84365b01c4e57.zip
erts: Make cerl -dump core work on mac
Diffstat (limited to 'erts/etc/unix')
-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