Mercurial > emacs
changeset 62203:8ea5bf9aeed7
(gud-tooltip-mode): Require tooltip to be safe.
(gud-tooltip-print-command): Add gdbmi case.
(gud-tooltip-tips): Call gdb-tooltip-print-1 first if there is
preprocessor info.
author | Nick Roberts <nickrob@snap.net.nz> |
---|---|
date | Mon, 09 May 2005 21:55:33 +0000 |
parents | 327af4f748d5 |
children | ba2e0c4d6a91 |
files | lisp/progmodes/gud.el |
diffstat | 1 files changed, 10 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/progmodes/gud.el Mon May 09 21:54:47 2005 +0000 +++ b/lisp/progmodes/gud.el Mon May 09 21:55:33 2005 +0000 @@ -3207,6 +3207,7 @@ "Toggle the display of GUD tooltips." :global t :group 'gud + (require 'tooltip) (if gud-tooltip-mode (progn (add-hook 'change-major-mode-hook 'gud-tooltip-change-major-mode) @@ -3253,7 +3254,7 @@ (setq expr (concat "*" expr))) (case gud-minor-mode ((gdb gdba) (concat "server print " expr)) - (dbx (concat "print " expr)) + ((dbx gdbmi) (concat "print " expr)) (xdb (concat "p " expr)) (sdb (concat expr "/")) (perldb expr))) @@ -3293,9 +3294,14 @@ expr)))) (let ((cmd (gud-tooltip-print-command expr))) (unless (null cmd) ; CMD can be nil if unknown debugger - (if (eq gud-minor-mode 'gdba) - (gdb-enqueue-input - (list (concat cmd "\n") 'gdb-tooltip-print)) + (if (memq gud-minor-mode '(gdba gdbmi)) + (if gdb-macro-info + (gdb-enqueue-input + (list (concat + gdb-server-prefix "macro expand " expr "\n") + `(lambda () (gdb-tooltip-print-1 ,expr)))) + (gdb-enqueue-input + (list (concat cmd "\n") 'gdb-tooltip-print))) (setq gud-tooltip-original-filter (process-filter process)) (set-process-filter process 'gud-tooltip-process-output) (gud-basic-call cmd))