aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes/gdb-ui.el
diff options
context:
space:
mode:
authorNick Roberts <[email protected]>2008-01-03 21:58:33 +0000
committerNick Roberts <[email protected]>2008-01-03 21:58:33 +0000
commitb3dac3299c8d5e095e89bed036c7f652fc95bc92 (patch)
tree00a312fc20cf5e6036506983296e92dbd7a5b0f9 /lisp/progmodes/gdb-ui.el
parentca8fef4410f0f27b2db64428a69fb5cdc9acab10 (diff)
(gdb-var-set-format): Set the output format
of watch expressions (only works fully with GDB 6.7 or later).
Diffstat (limited to 'lisp/progmodes/gdb-ui.el')
-rw-r--r--lisp/progmodes/gdb-ui.el16
1 files changed, 14 insertions, 2 deletions
diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el
index 37758fc444..a9a1bd4fae 100644
--- a/lisp/progmodes/gdb-ui.el
+++ b/lisp/progmodes/gdb-ui.el
@@ -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))