(gdb command-line)
(gdb-ann3))
+(defvar gdb-debug-log nil)
+
+(defcustom gdb-enable-debug-log nil
+ "Non-nil means record the process input and output in `gdb-debug-log'."
+ :type 'boolean
+ :group 'gud)
+
(defun gdb-ann3 ()
+ (setq gdb-debug-log nil)
(set (make-local-variable 'gud-minor-mode) 'gdba)
(set (make-local-variable 'gud-marker-filter) 'gud-gdba-marker-filter)
;;
(setq ,name val))))))
(def-gdb-var buffer-type nil
- "One of the symbols bound in gdb-buffer-rules")
+ "One of the symbols bound in `gdb-buffer-rules'.")
(def-gdb-var burst ""
"A string of characters from gdb that have not yet been processed.")
for subsequent processing by a command. This is the
disposition of output generated by commands that
gdb mode sends to gdb on its own behalf.
- post-emacs -- ignore input until the prompt annotation is
+ post-emacs -- ignore output until the prompt annotation is
received, then go to USER disposition.
")
(setq gdb-view-source t))
(defun gdb-send-item (item)
+ (if gdb-enable-debug-log (push (cons 'send item) gdb-debug-log))
(gdb-set-current-item item)
(if (stringp item)
(progn
(gdb-invalidate-registers)
(gdb-invalidate-locals)
(gdb-invalidate-threads)
- (dolist (frame (frame-list))
- (when (string-equal (frame-parameter frame 'name) "Speedbar")
- (setq gdb-var-changed t) ; force update
- (dolist (var gdb-var-list)
- (setcar (nthcdr 5 var) nil))))
- (gdb-var-update)))
+ (unless (eq window-system 'mac)
+ (dolist (frame (frame-list))
+ (when (string-equal (frame-parameter frame 'name) "Speedbar")
+ (setq gdb-var-changed t) ; force update
+ (dolist (var gdb-var-list)
+ (setcar (nthcdr 5 var) nil))))
+ (gdb-var-update))))
(let ((sink (gdb-get-output-sink)))
(cond
((eq sink 'user) t)
(defun gud-gdba-marker-filter (string)
"A gud marker filter for gdb. Handle a burst of output from GDB."
+ (if gdb-enable-debug-log (push (cons 'recv string) gdb-debug-log))
;; Recall the left over gud-marker-acc from last time
(setq gud-marker-acc (concat gud-marker-acc string))
;; Start accumulating output for the GUD buffer