Mercurial > emacs
changeset 75367:bab23bcfde6e
(gdb-var-create-regexp)
(gdb-var-create-handler): Handle value field in GDB output of
-var-create.
(gdb-max-frames): New variable.
(gdb-stack-buffer, gdb-frames-select): Use it.
(gdb-info-stack-custom): Help user customize gdb-max-frames,
if necessary.
(gdb-get-frame-number): Simplify.
author | Nick Roberts <nickrob@snap.net.nz> |
---|---|
date | Sun, 21 Jan 2007 21:03:40 +0000 |
parents | b987d93ee842 |
children | b6e579675674 |
files | lisp/progmodes/gdb-ui.el |
diffstat | 1 files changed, 18 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/progmodes/gdb-ui.el Sun Jan 21 21:02:40 2007 +0000 +++ b/lisp/progmodes/gdb-ui.el Sun Jan 21 21:03:40 2007 +0000 @@ -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.