diff options
| author | Nick Roberts | 2007-01-21 21:03:40 +0000 |
|---|---|---|
| committer | Nick Roberts | 2007-01-21 21:03:40 +0000 |
| commit | b35ef705cdf55f55c72eddd12f0313e716a63ace (patch) | |
| tree | 1c675933190f633a58bbb023c124497fc76ab738 | |
| parent | d1bf4d2f6a1cdeb280ea7d025463763236ea99f7 (diff) | |
| download | emacs-b35ef705cdf55f55c72eddd12f0313e716a63ace.tar.gz emacs-b35ef705cdf55f55c72eddd12f0313e716a63ace.zip | |
(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.
| -rw-r--r-- | lisp/progmodes/gdb-ui.el | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el index 5a081687622..01e4fe7abe7 100644 --- a/lisp/progmodes/gdb-ui.el +++ b/lisp/progmodes/gdb-ui.el | |||
| @@ -274,19 +274,22 @@ detailed description of this mode. | |||
| 274 | (gdb command-line) | 274 | (gdb command-line) |
| 275 | (gdb-init-1)) | 275 | (gdb-init-1)) |
| 276 | 276 | ||
| 277 | (defcustom gdb-debug-ring-max 128 | 277 | (defcustom gdb-debug-log-max 128 |
| 278 | "Maximum size of `gdb-debug-ring'." | 278 | "Maximum size of `gdb-debug-log'. If nil, size is unlimited." |
| 279 | :group 'gud | 279 | :group 'gud |
| 280 | :type 'integer | 280 | :type '(choice (integer :tag "Number of elements") |
| 281 | (const :tag "Unlimited" nil)) | ||
| 281 | :version "22.1") | 282 | :version "22.1") |
| 282 | 283 | ||
| 283 | (defvar gdb-debug-ring nil | 284 | (defvar gdb-debug-log nil |
| 284 | "List of commands sent to and replies received from GDB. Most recent | 285 | "List of commands sent to and replies received from GDB. Most |
| 285 | commands are listed first. This variable is used to debug GDB-UI.") | 286 | recent commands are listed first. This list stores only the last |
| 287 | 'gdb-debug-log-max' values. This variable is used to debug | ||
| 288 | GDB-UI.") | ||
| 286 | 289 | ||
| 287 | ;;;###autoload | 290 | ;;;###autoload |
| 288 | (defcustom gdb-enable-debug nil | 291 | (defcustom gdb-enable-debug nil |
| 289 | "Non-nil means record the process input and output in `gdb-debug-ring'." | 292 | "Non-nil means record the process input and output in `gdb-debug-log'." |
| 290 | :type 'boolean | 293 | :type 'boolean |
| 291 | :group 'gud | 294 | :group 'gud |
| 292 | :version "22.1") | 295 | :version "22.1") |
| @@ -317,7 +320,7 @@ Also display the main routine in the disassembly buffer if present." | |||
| 317 | :version "22.1") | 320 | :version "22.1") |
| 318 | 321 | ||
| 319 | (defcustom gdb-many-windows nil | 322 | (defcustom gdb-many-windows nil |
| 320 | "If nil just pop up the GUD buffer unless `gdb-show-main' is t. | 323 | "If nil, just pop up the GUD buffer unless `gdb-show-main' is t. |
| 321 | In this case start with two windows: one displaying the GUD | 324 | In this case start with two windows: one displaying the GUD |
| 322 | buffer and the other with the source file with the main routine | 325 | buffer and the other with the source file with the main routine |
| 323 | of the debugged program. Non-nil means display the layout shown | 326 | of the debugged program. Non-nil means display the layout shown |
| @@ -551,7 +554,7 @@ With arg, use separate IO iff arg is positive." | |||
| 551 | gdb-error nil | 554 | gdb-error nil |
| 552 | gdb-macro-info nil | 555 | gdb-macro-info nil |
| 553 | gdb-buffer-fringe-width (car (window-fringes)) | 556 | gdb-buffer-fringe-width (car (window-fringes)) |
| 554 | gdb-debug-ring nil | 557 | gdb-debug-log nil |
| 555 | gdb-signalled nil | 558 | gdb-signalled nil |
| 556 | gdb-source-window nil | 559 | gdb-source-window nil |
| 557 | gdb-inferior-status nil | 560 | gdb-inferior-status nil |
| @@ -1134,7 +1137,7 @@ This filter may simply queue input for a later time." | |||
| 1134 | (if gud-running | 1137 | (if gud-running |
| 1135 | (progn | 1138 | (progn |
| 1136 | (let ((item (concat string "\n"))) | 1139 | (let ((item (concat string "\n"))) |
| 1137 | (if gdb-enable-debug (push (cons 'send item) gdb-debug-ring)) | 1140 | (if gdb-enable-debug (push (cons 'send item) gdb-debug-log)) |
| 1138 | (process-send-string proc item))) | 1141 | (process-send-string proc item))) |
| 1139 | (if (and (string-match "\\\\$" string) | 1142 | (if (and (string-match "\\\\$" string) |
| 1140 | (not comint-input-sender-no-newline)) ;;Try to catch C-d. | 1143 | (not comint-input-sender-no-newline)) ;;Try to catch C-d. |
| @@ -1163,7 +1166,7 @@ This filter may simply queue input for a later time." | |||
| 1163 | 1166 | ||
| 1164 | (defun gdb-send-item (item) | 1167 | (defun gdb-send-item (item) |
| 1165 | (setq gdb-flush-pending-output nil) | 1168 | (setq gdb-flush-pending-output nil) |
| 1166 | (if gdb-enable-debug (push (cons 'send-item item) gdb-debug-ring)) | 1169 | (if gdb-enable-debug (push (cons 'send-item item) gdb-debug-log)) |
| 1167 | (setq gdb-current-item item) | 1170 | (setq gdb-current-item item) |
| 1168 | (let ((process (get-buffer-process gud-comint-buffer))) | 1171 | (let ((process (get-buffer-process gud-comint-buffer))) |
| 1169 | (if (eq (buffer-local-value 'gud-minor-mode gud-comint-buffer) 'gdba) | 1172 | (if (eq (buffer-local-value 'gud-minor-mode gud-comint-buffer) 'gdba) |
| @@ -1514,9 +1517,10 @@ happens to be appropriate." | |||
| 1514 | (if gdb-flush-pending-output | 1517 | (if gdb-flush-pending-output |
| 1515 | nil | 1518 | nil |
| 1516 | (when gdb-enable-debug | 1519 | (when gdb-enable-debug |
| 1517 | (push (cons 'recv string) gdb-debug-ring) | 1520 | (push (cons 'recv string) gdb-debug-log) |
| 1518 | (if (> (length gdb-debug-ring) gdb-debug-ring-max) | 1521 | (if (and gdb-debug-log-max |
| 1519 | (setcdr (nthcdr (1- gdb-debug-ring-max) gdb-debug-ring) nil))) | 1522 | (> (length gdb-debug-log) gdb-debug-log-max)) |
| 1523 | (setcdr (nthcdr (1- gdb-debug-log-max) gdb-debug-log) nil))) | ||
| 1520 | ;; Recall the left over gud-marker-acc from last time. | 1524 | ;; Recall the left over gud-marker-acc from last time. |
| 1521 | (setq gud-marker-acc (concat gud-marker-acc string)) | 1525 | (setq gud-marker-acc (concat gud-marker-acc string)) |
| 1522 | ;; Start accumulating output for the GUD buffer. | 1526 | ;; Start accumulating output for the GUD buffer. |