cerl hanging on gdb prompt
Michael Santos
michael.santos@REDACTED
Sat Oct 2 00:07:46 CEST 2010
At least for me, running cerl on Ubuntu 10.04 hangs at the gdb prompt.
I've tried 2 versions of emacs with gdb:
GNU Emacs 23.1.1
GNU Emacs 22.2.1
GNU gdb (GDB) 7.1-ubuntu
cerl works fine on Mac OS X.
The following changes fix it for me (and didn't cause any problems on
Mac OS X), but I only use emacs with cerl, so I don't know if these
changes are correct.
diff --git a/erts/etc/unix/cerl.src b/erts/etc/unix/cerl.src
index 9dab9fc..de34ffc 100644
--- a/erts/etc/unix/cerl.src
+++ b/erts/etc/unix/cerl.src
@@ -66,4 +66,5 @@ core=
GDB=
+GDBARGS=
GDBBP=
TYPE=
@@ -278,7 +279,13 @@ else
esac
+ gdbcmd="$gdbcmd $GDBBP \
+ (insert-string \"source $ROOTDIR/erts/etc/unix/etp-commands\") \
+ (comint-send-input)"
+
# Set annotation level for gdb in emacs 22 and higher.
emacs_major=`$EMACS --version | head -1 | sed 's,^[^0-9]*\([0-9]*\).*,\1,g'`
- if [ '!' -z "$emacs_major" -a $emacs_major -gt 21 ]; then
+ if [ '!' -z "$emacs_major" -a $emacs_major -gt 22 ]; then
+ GDBARGS="--annotate=3"
+ elif [ '!' -z "$emacs_major" -a $emacs_major -gt 21 ]; then
# Hack - wait for etp-commands to be loaded and then set
# annotation level, could be done more beautifully than with sit-for...
@@ -288,8 +295,5 @@ else
(comint-send-input)"
fi
- gdbcmd="$gdbcmd $GDBBP \
- (insert-string \"source $ROOTDIR/erts/etc/unix/etp-commands\") \
- (comint-send-input)"
# Fire up gdb in emacs...
- exec $EMACS --eval "(progn (gdb \"gdb $EMU\") $gdbcmd)"
+ exec $EMACS --eval "(progn (gdb \"gdb $GDBARGS $EMU\") $gdbcmd)"
fi
More information about the erlang-bugs
mailing list