aboutsummaryrefslogtreecommitdiffstats
path: root/erts
diff options
context:
space:
mode:
authorPatrik Nyblom <[email protected]>2010-10-07 11:48:46 +0200
committerPatrik Nyblom <[email protected]>2010-10-07 11:48:46 +0200
commitba7c2beca25735327366ad7eac31bbd3a4898395 (patch)
tree8a7eb74b196ab2e37da2cd657dc1d6191f38f08e /erts
parent9cd4afbb49d3a1802b2dcb4e15a8797286045644 (diff)
downloadotp-ba7c2beca25735327366ad7eac31bbd3a4898395.tar.gz
otp-ba7c2beca25735327366ad7eac31bbd3a4898395.tar.bz2
otp-ba7c2beca25735327366ad7eac31bbd3a4898395.zip
Incorporate Michael Santos patch for cerl and gdb via emacs
Michael Santos supplied a very nice patch that did set the annotation level correctly for gdb when run from cerl in emacs. The patch adds --annotate=3 to the gdb command line, which makes emacs parse the gdb output correctly, making the right source code be loaded in the emacs buffer. While integrating it, I removed my faulty code trying to do the same with hacky elisp commands. Michaels way is the right way to do it. Thanks!
Diffstat (limited to 'erts')
-rw-r--r--erts/etc/unix/cerl.src10
1 files changed, 3 insertions, 7 deletions
diff --git a/erts/etc/unix/cerl.src b/erts/etc/unix/cerl.src
index 9dab9fcfcc..73b1bafbe0 100644
--- a/erts/etc/unix/cerl.src
+++ b/erts/etc/unix/cerl.src
@@ -66,6 +66,7 @@ core=
GDB=
GDBBP=
+GDBARGS=
TYPE=
EMU_TYPE=
debug=
@@ -280,16 +281,11 @@ else
# 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
- # Hack - wait for etp-commands to be loaded and then set
- # annotation level, could be done more beautifully than with sit-for...
- gdbcmd="$gdbcmd \
- (sit-for 1) \
- (insert-string \"set annotate 3\") \
- (comint-send-input)"
+ GDBARGS="--annotate=3 "
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