1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-15 17:00:26 +00:00

(gdb-var-set-format): Set the output format

of watch expressions (only works fully with GDB 6.7 or later).
This commit is contained in:
Nick Roberts 2008-01-03 21:58:33 +00:00
parent ca8fef4410
commit b3dac3299c

View File

@ -881,11 +881,23 @@ type_changed=\".*?\".*?}")
(setq gdb-pending-triggers
(delq 'gdb-var-update gdb-pending-triggers)))
(defun gdb-var-set-format (format)
"Set the output format for a variable displayed in the speedbar."
(let* ((var (nth (- (count-lines (point-min) (point)) 2) gdb-var-list))
(varnum (car var)))
(gdb-enqueue-input
(list
(if (eq (buffer-local-value 'gud-minor-mode gud-comint-buffer) 'gdba)
(concat "server interpreter mi \"-var-set-format "
varnum " " format "\"\n")
(concat "-var-set-format " varnum " " format "\n"))
'ignore))
(gdb-var-update-1)))
(defun gdb-var-delete-1 (varnum)
(gdb-enqueue-input
(list
(if (eq (buffer-local-value 'gud-minor-mode gud-comint-buffer)
'gdba)
(if (eq (buffer-local-value 'gud-minor-mode gud-comint-buffer) 'gdba)
(concat "server interpreter mi \"-var-delete " varnum "\"\n")
(concat "-var-delete " varnum "\n"))
'ignore))