emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/progmodes/gdb-ui.el,v


From: Nick Roberts
Subject: [Emacs-diffs] Changes to emacs/lisp/progmodes/gdb-ui.el,v
Date: Sun, 21 Jan 2007 21:03:40 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Nick Roberts <nickrob>  07/01/21 21:03:40

Index: gdb-ui.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/progmodes/gdb-ui.el,v
retrieving revision 1.197
retrieving revision 1.198
diff -u -b -r1.197 -r1.198
--- gdb-ui.el   21 Jan 2007 10:49:42 -0000      1.197
+++ gdb-ui.el   21 Jan 2007 21:03:40 -0000      1.198
@@ -274,19 +274,22 @@
   (gdb command-line)
   (gdb-init-1))
 
-(defcustom gdb-debug-ring-max 128
-  "Maximum size of `gdb-debug-ring'."
+(defcustom gdb-debug-log-max 128
+  "Maximum size of `gdb-debug-log'.  If nil, size is unlimited."
   :group 'gud
-  :type 'integer
+  :type '(choice (integer :tag "Number of elements")
+                (const   :tag "Unlimited" nil))
   :version "22.1")
 
-(defvar gdb-debug-ring nil
-  "List of commands sent to and replies received from GDB.  Most recent
-commands are listed first.  This variable is used to debug GDB-UI.")
+(defvar gdb-debug-log nil
+  "List of commands sent to and replies received from GDB.  Most
+recent commands are listed first.  This list stores only the last
+'gdb-debug-log-max' values.  This variable is used to debug
+GDB-UI.")
 
 ;;;###autoload
 (defcustom gdb-enable-debug nil
-  "Non-nil means record the process input and output in `gdb-debug-ring'."
+  "Non-nil means record the process input and output in `gdb-debug-log'."
   :type 'boolean
   :group 'gud
   :version "22.1")
@@ -317,7 +320,7 @@
   :version "22.1")
 
 (defcustom gdb-many-windows nil
-  "If nil just pop up the GUD buffer unless `gdb-show-main' is t.
+  "If nil, just pop up the GUD buffer unless `gdb-show-main' is t.
 In this case start with two windows: one displaying the GUD
 buffer and the other with the source file with the main routine
 of the debugged program.  Non-nil means display the layout shown
@@ -551,7 +554,7 @@
        gdb-error nil
        gdb-macro-info nil
        gdb-buffer-fringe-width (car (window-fringes))
-       gdb-debug-ring nil
+       gdb-debug-log nil
        gdb-signalled nil
        gdb-source-window nil
        gdb-inferior-status nil
@@ -1134,7 +1137,7 @@
     (if gud-running
        (progn
          (let ((item (concat string "\n")))
-           (if gdb-enable-debug (push (cons 'send item) gdb-debug-ring))
+           (if gdb-enable-debug (push (cons 'send item) gdb-debug-log))
            (process-send-string proc item)))
       (if (and (string-match "\\\\$" string)
               (not comint-input-sender-no-newline)) ;;Try to catch C-d.
@@ -1163,7 +1166,7 @@
 
 (defun gdb-send-item (item)
   (setq gdb-flush-pending-output nil)
-  (if gdb-enable-debug (push (cons 'send-item item) gdb-debug-ring))
+  (if gdb-enable-debug (push (cons 'send-item item) gdb-debug-log))
   (setq gdb-current-item item)
   (let ((process (get-buffer-process gud-comint-buffer)))
     (if (eq (buffer-local-value 'gud-minor-mode gud-comint-buffer) 'gdba)
@@ -1514,9 +1517,10 @@
   (if gdb-flush-pending-output
       nil
     (when gdb-enable-debug
-       (push (cons 'recv string) gdb-debug-ring)
-       (if (> (length gdb-debug-ring) gdb-debug-ring-max)
-         (setcdr (nthcdr (1- gdb-debug-ring-max) gdb-debug-ring) nil)))
+       (push (cons 'recv string) gdb-debug-log)
+       (if (and gdb-debug-log-max
+                (> (length gdb-debug-log) gdb-debug-log-max))
+           (setcdr (nthcdr (1- gdb-debug-log-max) gdb-debug-log) nil)))
     ;; 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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]