gdb-debug-ring nil
gdb-signalled nil
gdb-source-window nil
- gdb-inferior-status nil)
+ gdb-inferior-status nil
+ gdb-continuation nil)
(setq gdb-buffer-type 'gdba)
(require 'tooltip)
(save-selected-window
(let ((expr (if arg
- (read-string "Name of variable: ")
+ (completing-read "Name of variable: "
+ 'gud-gdb-complete-command)
(tooltip-identifier-from-point (point)))))
(catch 'already-watched
(dolist (var gdb-var-list)
;;
;; These lists are consumed tail first.
;;
+(defvar gdb-continuation nil)
(defun gdb-send (proc string)
"A comint send filter for gdb.
(with-current-buffer gud-comint-buffer
(let ((inhibit-read-only t))
(remove-text-properties (point-min) (point-max) '(face))))
- (let ((item (concat string "\n")))
- (if gud-running
- (progn
- (if gdb-enable-debug (push (cons 'send item) gdb-debug-ring))
- (process-send-string proc item))
- (gdb-enqueue-input item))))
+ (if (string-match "\\\\$" string)
+ (setq gdb-continuation (concat gdb-continuation string "\n"))
+ (let ((item (concat gdb-continuation string "\n")))
+ (if gud-running
+ (progn
+ (if gdb-enable-debug (push (cons 'send item) gdb-debug-ring))
+ (process-send-string proc item))
+ (gdb-enqueue-input item)))
+ (setq gdb-continuation nil)))
;; Note: Stuff enqueued here will be sent to the next prompt, even if it
;; is a query, or other non-top-level prompt.