summaryrefslogtreecommitdiff
path: root/lisp/progmodes/gdb-ui.el
diff options
context:
space:
mode:
authorNick Roberts <nickrob@snap.net.nz>2004-11-08 21:16:33 +0000
committerNick Roberts <nickrob@snap.net.nz>2004-11-08 21:16:33 +0000
commitde1b81122d31f1ac03eaafa6cafe68e3f28e60d8 (patch)
tree1556aa69b8735375620dc92d7ccf316157b74cf8 /lisp/progmodes/gdb-ui.el
parentec3dd7523b6bc6b2f1fb23913f0a3fc84f74ec01 (diff)
downloademacs-de1b81122d31f1ac03eaafa6cafe68e3f28e60d8.tar.gz
emacs-de1b81122d31f1ac03eaafa6cafe68e3f28e60d8.tar.bz2
emacs-de1b81122d31f1ac03eaafa6cafe68e3f28e60d8.zip
(gdb-current-stack-level): New variable.
(gdb-info-frames-custom, gdb-frame-handler): Use it to find current frame (in case of recursive calls). (gdb-show-changed-values): Add :version keyword.
Diffstat (limited to 'lisp/progmodes/gdb-ui.el')
-rw-r--r--lisp/progmodes/gdb-ui.el12
1 files changed, 8 insertions, 4 deletions
diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el
index 78aa6757e81..7086e3b0b01 100644
--- a/lisp/progmodes/gdb-ui.el
+++ b/lisp/progmodes/gdb-ui.el
@@ -60,6 +60,7 @@
(defvar gdb-previous-address nil)
(defvar gdb-previous-frame nil)
(defvar gdb-current-frame nil)
+(defvar gdb-current-stack-level nil)
(defvar gdb-current-language nil)
(defvar gdb-view-source t "Non-nil means that source code can be viewed.")
(defvar gdb-selected-view 'source "Code type that user wishes to view.")
@@ -183,6 +184,7 @@ detailed description of this mode.
(setq gdb-previous-address nil)
(setq gdb-previous-frame nil)
(setq gdb-current-frame nil)
+ (setq gdb-current-stack-level nil)
(setq gdb-view-source t)
(setq gdb-selected-view 'source)
(setq gdb-var-list nil)
@@ -393,7 +395,8 @@ detailed description of this mode.
"If non-nil highlight values that have recently changed in the speedbar.
The highlighting is done with `font-lock-warning-face'."
:type 'boolean
- :group 'gud)
+ :group 'gud
+ :version "21.4")
(defun gdb-speedbar-expand-node (text token indent)
"Expand the node the user clicked on.
@@ -1291,9 +1294,8 @@ static char *magick[] = {
'(mouse-face highlight
help-echo "mouse-2, RET: Select frame"))
(beginning-of-line)
- (when (and (or (looking-at "^#[0-9]*\\s-*\\S-* in \\(\\S-*\\)")
- (looking-at "^#[0-9]*\\s-*\\(\\S-*\\)"))
- (equal (match-string 1) gdb-current-frame))
+ (when (and (looking-at "^#\\([0-9]+\\)")
+ (equal (match-string 1) gdb-current-stack-level))
(put-text-property (point-at-bol) (point-at-eol)
'face '(:inverse-video t)))
(forward-line 1))))))
@@ -2047,6 +2049,8 @@ BUFFER nil or omitted means use the current buffer."
(delq 'gdb-get-current-frame gdb-pending-triggers))
(with-current-buffer (gdb-get-create-buffer 'gdb-partial-output-buffer)
(goto-char (point-min))
+ (if (looking-at "Stack level \\([0-9]+\\)")
+ (setq gdb-current-stack-level (match-string 1)))
(forward-line)
(if (looking-at ".*=\\s-+0x\\(\\S-*\\)\\s-+in\\s-+\\(\\S-*?\\);? ")
(progn