aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNick Roberts2005-12-29 02:04:36 +0000
committerNick Roberts2005-12-29 02:04:36 +0000
commitd0b9c14d9fa4f77c952300c50ab35eddf3f45980 (patch)
tree3b7271bb71064cd6bfff3e69ca7074338be3ff1e
parentcf84aa19f53764e7fe66434d3a53d7f88cb18bb5 (diff)
downloademacs-d0b9c14d9fa4f77c952300c50ab35eddf3f45980.tar.gz
emacs-d0b9c14d9fa4f77c952300c50ab35eddf3f45980.zip
(gdb-tooltip-print, gdb-tooltip-print-1):
Display name of expression instead of convenience variable. (gdb-post-prompt): Only call gdb-get-changed-registers if needed.
-rw-r--r--lisp/progmodes/gdb-ui.el15
1 files changed, 10 insertions, 5 deletions
diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el
index 002bae1b019..e7bda34e080 100644
--- a/lisp/progmodes/gdb-ui.el
+++ b/lisp/progmodes/gdb-ui.el
@@ -331,10 +331,14 @@ With arg, use separate IO iff arg is positive."
331 (setq name (nth 1 (split-string define "[( ]"))) 331 (setq name (nth 1 (split-string define "[( ]")))
332 (push (cons name define) gdb-define-alist)))) 332 (push (cons name define) gdb-define-alist))))
333 333
334(defun gdb-tooltip-print () 334(defun gdb-tooltip-print (expr)
335 (tooltip-show 335 (tooltip-show
336 (with-current-buffer (gdb-get-buffer 'gdb-partial-output-buffer) 336 (with-current-buffer (gdb-get-buffer 'gdb-partial-output-buffer)
337 (let ((string (buffer-string))) 337 (goto-char (point-min))
338 (let ((string
339 (if (search-forward "=" nil t)
340 (concat expr (buffer-substring (- (point) 2) (point-max)))
341 (buffer-string))))
338 ;; remove newline for gud-tooltip-echo-area 342 ;; remove newline for gud-tooltip-echo-area
339 (substring string 0 (- (length string) 1)))) 343 (substring string 0 (- (length string) 1))))
340 (or gud-tooltip-echo-area tooltip-use-echo-area))) 344 (or gud-tooltip-echo-area tooltip-use-echo-area)))
@@ -349,7 +353,7 @@ With arg, use separate IO iff arg is positive."
349 (unless (looking-at "\\S-+.*(.*).*") 353 (unless (looking-at "\\S-+.*(.*).*")
350 (gdb-enqueue-input 354 (gdb-enqueue-input
351 (list (concat gdb-server-prefix "print " expr "\n") 355 (list (concat gdb-server-prefix "print " expr "\n")
352 'gdb-tooltip-print)))))) 356 `(lambda () (gdb-tooltip-print ,expr))))))))
353 357
354(defconst gdb-source-file-regexp "\\(.+?\\), \\|\\([^, \n].*$\\)") 358(defconst gdb-source-file-regexp "\\(.+?\\), \\|\\([^, \n].*$\\)")
355 359
@@ -541,7 +545,8 @@ With arg, use separate IO iff arg is positive."
541 :version "22.1") 545 :version "22.1")
542 546
543(defun gdb-speedbar-auto-raise (arg) 547(defun gdb-speedbar-auto-raise (arg)
544 "Toggle automatic raising of the speedbar for watch expressions." 548 "Toggle automatic raising of the speedbar for watch expressions.
549With arg, automatically raise speedbar iff arg is positive."
545 (interactive "P") 550 (interactive "P")
546 (setq gdb-speedbar-auto-raise 551 (setq gdb-speedbar-auto-raise
547 (if (null arg) 552 (if (null arg)
@@ -1194,7 +1199,7 @@ happens to be appropriate."
1194 1199
1195 (if (string-equal gdb-version "pre-6.4") 1200 (if (string-equal gdb-version "pre-6.4")
1196 (gdb-invalidate-registers) 1201 (gdb-invalidate-registers)
1197 (gdb-get-changed-registers) 1202 (if (gdb-get-buffer 'gdb-registers-buffer) (gdb-get-changed-registers))
1198 (gdb-invalidate-registers-1)) 1203 (gdb-invalidate-registers-1))
1199 1204
1200 (gdb-invalidate-memory) 1205 (gdb-invalidate-memory)