diff options
author | Nick Roberts <nickrob@snap.net.nz> | 2005-05-09 21:55:33 +0000 |
---|---|---|
committer | Nick Roberts <nickrob@snap.net.nz> | 2005-05-09 21:55:33 +0000 |
commit | df94fa1e38259d1066763019ca711bfb4114efe1 (patch) | |
tree | e799641e43bd38330d5b5a5f5ce82f90a7fa1ffe /lisp | |
parent | 89d8189aa891afe6048899d599c77c72bf0a3402 (diff) | |
download | emacs-df94fa1e38259d1066763019ca711bfb4114efe1.tar.gz |
(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.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/progmodes/gud.el | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index 544a4804639..5c81ba7f6f9 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el @@ -3207,6 +3207,7 @@ This event can be examined by forms in GUD-TOOLTIP-DISPLAY.") "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 @@ If GUD-TOOLTIP-DEREFERENCE is t, also prepend a `*' to EXPR." (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 @@ This function must return nil if it doesn't handle EVENT." 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)) |