aboutsummaryrefslogtreecommitdiffstats
path: root/erts/etc
diff options
context:
space:
mode:
authorPatrik Nyblom <[email protected]>2010-03-10 12:57:00 +0000
committerErlang/OTP <[email protected]>2010-03-10 12:57:00 +0000
commita251ad7488c6a1268c4aca0f1937cc397f663325 (patch)
tree27c9e596258f3ce9ee080a6791607536f6233b98 /erts/etc
parente6ba8d5ede7fb2af9312180459a8a3db0cb081be (diff)
downloadotp-a251ad7488c6a1268c4aca0f1937cc397f663325.tar.gz
otp-a251ad7488c6a1268c4aca0f1937cc397f663325.tar.bz2
otp-a251ad7488c6a1268c4aca0f1937cc397f663325.zip
cerl: Work around missing source frame in when running gdb in emacs
This problems occurs in some recent versions of Emacs.
Diffstat (limited to 'erts/etc')
-rw-r--r--erts/etc/unix/cerl.src20
1 files changed, 15 insertions, 5 deletions
diff --git a/erts/etc/unix/cerl.src b/erts/etc/unix/cerl.src
index f81ef6b0fe..9dab9fcfcc 100644
--- a/erts/etc/unix/cerl.src
+++ b/erts/etc/unix/cerl.src
@@ -1,20 +1,20 @@
#!/bin/sh
#
# %CopyrightBegin%
-#
-# Copyright Ericsson AB 2003-2009. All Rights Reserved.
-#
+#
+# Copyright Ericsson AB 2003-2010. All Rights Reserved.
+#
# The contents of this file are subject to the Erlang Public License,
# Version 1.1, (the "License"); you may not use this file except in
# compliance with the License. You should have received a copy of the
# Erlang Public License along with this software. If not, it can be
# retrieved online at http://www.erlang.org/.
-#
+#
# Software distributed under the License is distributed on an "AS IS"
# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
# the License for the specific language governing rights and limitations
# under the License.
-#
+#
# %CopyrightEnd%
#
#
@@ -277,6 +277,16 @@ else
;;
esac
+ # 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)"
+ fi
gdbcmd="$gdbcmd $GDBBP \
(insert-string \"source $ROOTDIR/erts/etc/unix/etp-commands\") \
(comint-send-input)"