aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNick Roberts2006-03-16 22:55:00 +0000
committerNick Roberts2006-03-16 22:55:00 +0000
commit2a166e260cb65431e25da13f1a46e99f96d84121 (patch)
tree39070d692504033c62f3092edfe26312f9dd34b6
parent8ab8e5215be55076a8b8bfdbcab3a39fba04c870 (diff)
downloademacs-2a166e260cb65431e25da13f1a46e99f96d84121.tar.gz
emacs-2a166e260cb65431e25da13f1a46e99f96d84121.zip
(gud-watch): Provide completion.
(gdb-continuation): New variable. (gdb-send): Deal with continuation lines.
-rw-r--r--lisp/progmodes/gdb-ui.el22
1 files changed, 14 insertions, 8 deletions
diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el
index 86d1cb02da0..689124944dd 100644
--- a/lisp/progmodes/gdb-ui.el
+++ b/lisp/progmodes/gdb-ui.el
@@ -536,7 +536,8 @@ With arg, use separate IO iff arg is positive."
536 gdb-debug-ring nil 536 gdb-debug-ring nil
537 gdb-signalled nil 537 gdb-signalled nil
538 gdb-source-window nil 538 gdb-source-window nil
539 gdb-inferior-status nil) 539 gdb-inferior-status nil
540 gdb-continuation nil)
540 541
541 (setq gdb-buffer-type 'gdba) 542 (setq gdb-buffer-type 'gdba)
542 543
@@ -682,7 +683,8 @@ With arg, enter name of variable to be watched in the minibuffer."
682 (require 'tooltip) 683 (require 'tooltip)
683 (save-selected-window 684 (save-selected-window
684 (let ((expr (if arg 685 (let ((expr (if arg
685 (read-string "Name of variable: ") 686 (completing-read "Name of variable: "
687 'gud-gdb-complete-command)
686 (tooltip-identifier-from-point (point))))) 688 (tooltip-identifier-from-point (point)))))
687 (catch 'already-watched 689 (catch 'already-watched
688 (dolist (var gdb-var-list) 690 (dolist (var gdb-var-list)
@@ -1076,6 +1078,7 @@ The key should be one of the cars in `gdb-buffer-rules-assoc'."
1076;; 1078;;
1077;; These lists are consumed tail first. 1079;; These lists are consumed tail first.
1078;; 1080;;
1081(defvar gdb-continuation nil)
1079 1082
1080(defun gdb-send (proc string) 1083(defun gdb-send (proc string)
1081 "A comint send filter for gdb. 1084 "A comint send filter for gdb.
@@ -1083,12 +1086,15 @@ This filter may simply queue input for a later time."
1083 (with-current-buffer gud-comint-buffer 1086 (with-current-buffer gud-comint-buffer
1084 (let ((inhibit-read-only t)) 1087 (let ((inhibit-read-only t))
1085 (remove-text-properties (point-min) (point-max) '(face)))) 1088 (remove-text-properties (point-min) (point-max) '(face))))
1086 (let ((item (concat string "\n"))) 1089 (if (string-match "\\\\$" string)
1087 (if gud-running 1090 (setq gdb-continuation (concat gdb-continuation string "\n"))
1088 (progn 1091 (let ((item (concat gdb-continuation string "\n")))
1089 (if gdb-enable-debug (push (cons 'send item) gdb-debug-ring)) 1092 (if gud-running
1090 (process-send-string proc item)) 1093 (progn
1091 (gdb-enqueue-input item)))) 1094 (if gdb-enable-debug (push (cons 'send item) gdb-debug-ring))
1095 (process-send-string proc item))
1096 (gdb-enqueue-input item)))
1097 (setq gdb-continuation nil)))
1092 1098
1093;; Note: Stuff enqueued here will be sent to the next prompt, even if it 1099;; Note: Stuff enqueued here will be sent to the next prompt, even if it
1094;; is a query, or other non-top-level prompt. 1100;; is a query, or other non-top-level prompt.