Mercurial > emacs
changeset 49249:7c4bc41333d1
Improve commentary.
(gdb-window-height, gdb-window-width, gdb-display-number-end):
Customize the dimensions of frames for displayed expressions.
(gdb-error-begin): Comment out because it is not used because of
bug/quirk in annotations.
(gdb-reset): Use with-current-buffer.
author | Nick Roberts <nickrob@snap.net.nz> |
---|---|
date | Tue, 14 Jan 2003 23:58:13 +0000 |
parents | 3e383126e57e |
children | 6c62487c3c29 |
files | lisp/gdb-ui.el |
diffstat | 1 files changed, 31 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/gdb-ui.el Tue Jan 14 23:57:32 2003 +0000 +++ b/lisp/gdb-ui.el Tue Jan 14 23:58:13 2003 +0000 @@ -25,16 +25,21 @@ ;;; Commentary: -;; This file is based on gdba.el from GDB 5.0 written by Tom Lord and Jim -;; Kingdon and uses GDB's annotation interface. It has been extended to use -;; features of Emacs 21 such as the display margin for breakpoints and the -;; toolbar. It also has new buffers and lots of other new features such as -;; formatted auto-display of arrays and structures (see the GDB-UI section in -;; the Emacs info manual). Start the debugger with M-x gdba. +;; This mode acts as a graphical user interface to GDB. You can interact with +;; GDB through the GUD buffer in the usual way, but there are also further +;; buffers which control the execution and describe the state of your program. +;; It separates the input/output of your program from that of GDB and displays +;; expressions and their current values in their own buffers. It also uses +;; features of Emacs 21 such as the display margin for breakpoints, and the +;; toolbar (see the GDB User Interface section in the Emacs info manual). -;; You don't need to know about annotations to use this mode as a graphical -;; user interface to GDB. However, if you are interested developing the mode -;; itself see the Annotations section in the GDB info manual. +;; Start the debugger with M-x gdba. + +;; This file is based on gdba.el from GDB 5.0 written by Tom Lord and Jim +;; Kingdon and uses GDB's annotation interface. You don't need to know about +;; annotations to use this mode as a debugger, but if you are interested +;; developing the mode itself, then see the Annotations section in the GDB +;; info manual. ;; ;; Known Bugs: Does not auto-display arrays of structures or structures ;; containing arrays. @@ -43,6 +48,16 @@ (require 'gud) +(defcustom gdb-window-height 20 + "*Number of lines in a frame for a displayed expression in GDB-UI." + :type 'integer + :group 'gud) + +(defcustom gdb-window-width 30 + "Width of a frame for a displayed expression in GDB-UI." + :type 'integer + :group 'gud) + (defvar gdb-main-or-pc nil "Initialisation for Assembler buffer.") (defvar gdb-current-address nil) (defvar gdb-display-in-progress nil) @@ -662,9 +677,10 @@ ;; If we get an error whilst evaluating one of the expressions ;; we won't get the display-end annotation. Set the sink back to -;; user to make sure that the error message is seen -(defun gdb-error-begin (ignored) - (gdb-set-output-sink 'user)) +;; user to make sure that the error message is seen. +;; NOT USED: see annotation-rules for reason. +;(defun gdb-error-begin (ignored) +; (gdb-set-output-sink 'user)) (defun gdb-display-begin (ignored) (gdb-set-output-sink 'emacs) @@ -698,7 +714,8 @@ (if (string-equal (frame-parameter frame 'name) gdb-expression-buffer-name) (throw 'frame-exists nil))) - (make-frame '((height . 20) (width . 40) + (make-frame `((height . ,gdb-window-height) + (width . ,gdb-window-width) (tool-bar-lines . nil) (menu-bar-lines . nil) (minibuffer . nil)))) @@ -1935,8 +1952,7 @@ (gdb-delete-frames '()) (dolist (buffer (buffer-list)) (if (not (eq buffer gud-comint-buffer)) - (save-excursion - (set-buffer buffer) + (with-current-buffer buffer (if (eq gud-minor-mode 'gdba) (if (string-match "^\*.+*$" (buffer-name)) (kill-buffer nil)