aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNick Roberts2003-01-14 23:58:13 +0000
committerNick Roberts2003-01-14 23:58:13 +0000
commit377f175fe2a35138e7bd19b5ddc15875286e47b6 (patch)
tree9387d7a84fbec860b9864cb86cc2dda517547413
parent8c62e68b01d3672c0128ac9c031d14ca1e8337d4 (diff)
downloademacs-377f175fe2a35138e7bd19b5ddc15875286e47b6.tar.gz
emacs-377f175fe2a35138e7bd19b5ddc15875286e47b6.zip
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.
-rw-r--r--lisp/gdb-ui.el48
1 files changed, 32 insertions, 16 deletions
diff --git a/lisp/gdb-ui.el b/lisp/gdb-ui.el
index 72d30d3e226..a01a35e88c6 100644
--- a/lisp/gdb-ui.el
+++ b/lisp/gdb-ui.el
@@ -25,16 +25,21 @@
25 25
26;;; Commentary: 26;;; Commentary:
27 27
28;; This file is based on gdba.el from GDB 5.0 written by Tom Lord and Jim 28;; This mode acts as a graphical user interface to GDB. You can interact with
29;; Kingdon and uses GDB's annotation interface. It has been extended to use 29;; GDB through the GUD buffer in the usual way, but there are also further
30;; features of Emacs 21 such as the display margin for breakpoints and the 30;; buffers which control the execution and describe the state of your program.
31;; toolbar. It also has new buffers and lots of other new features such as 31;; It separates the input/output of your program from that of GDB and displays
32;; formatted auto-display of arrays and structures (see the GDB-UI section in 32;; expressions and their current values in their own buffers. It also uses
33;; the Emacs info manual). Start the debugger with M-x gdba. 33;; features of Emacs 21 such as the display margin for breakpoints, and the
34 34;; toolbar (see the GDB User Interface section in the Emacs info manual).
35;; You don't need to know about annotations to use this mode as a graphical 35
36;; user interface to GDB. However, if you are interested developing the mode 36;; Start the debugger with M-x gdba.
37;; itself see the Annotations section in the GDB info manual. 37
38;; This file is based on gdba.el from GDB 5.0 written by Tom Lord and Jim
39;; Kingdon and uses GDB's annotation interface. You don't need to know about
40;; annotations to use this mode as a debugger, but if you are interested
41;; developing the mode itself, then see the Annotations section in the GDB
42;; info manual.
38;; 43;;
39;; Known Bugs: Does not auto-display arrays of structures or structures 44;; Known Bugs: Does not auto-display arrays of structures or structures
40;; containing arrays. 45;; containing arrays.
@@ -43,6 +48,16 @@
43 48
44(require 'gud) 49(require 'gud)
45 50
51(defcustom gdb-window-height 20
52 "*Number of lines in a frame for a displayed expression in GDB-UI."
53 :type 'integer
54 :group 'gud)
55
56(defcustom gdb-window-width 30
57 "Width of a frame for a displayed expression in GDB-UI."
58 :type 'integer
59 :group 'gud)
60
46(defvar gdb-main-or-pc nil "Initialisation for Assembler buffer.") 61(defvar gdb-main-or-pc nil "Initialisation for Assembler buffer.")
47(defvar gdb-current-address nil) 62(defvar gdb-current-address nil)
48(defvar gdb-display-in-progress nil) 63(defvar gdb-display-in-progress nil)
@@ -662,9 +677,10 @@ output from the current command if that happens to be appropriate."
662 677
663;; If we get an error whilst evaluating one of the expressions 678;; If we get an error whilst evaluating one of the expressions
664;; we won't get the display-end annotation. Set the sink back to 679;; we won't get the display-end annotation. Set the sink back to
665;; user to make sure that the error message is seen 680;; user to make sure that the error message is seen.
666(defun gdb-error-begin (ignored) 681;; NOT USED: see annotation-rules for reason.
667 (gdb-set-output-sink 'user)) 682;(defun gdb-error-begin (ignored)
683; (gdb-set-output-sink 'user))
668 684
669(defun gdb-display-begin (ignored) 685(defun gdb-display-begin (ignored)
670 (gdb-set-output-sink 'emacs) 686 (gdb-set-output-sink 'emacs)
@@ -698,7 +714,8 @@ output from the current command if that happens to be appropriate."
698 (if (string-equal (frame-parameter frame 'name) 714 (if (string-equal (frame-parameter frame 'name)
699 gdb-expression-buffer-name) 715 gdb-expression-buffer-name)
700 (throw 'frame-exists nil))) 716 (throw 'frame-exists nil)))
701 (make-frame '((height . 20) (width . 40) 717 (make-frame `((height . ,gdb-window-height)
718 (width . ,gdb-window-width)
702 (tool-bar-lines . nil) 719 (tool-bar-lines . nil)
703 (menu-bar-lines . nil) 720 (menu-bar-lines . nil)
704 (minibuffer . nil)))) 721 (minibuffer . nil))))
@@ -1935,8 +1952,7 @@ static char *magick[] = {
1935 (gdb-delete-frames '()) 1952 (gdb-delete-frames '())
1936 (dolist (buffer (buffer-list)) 1953 (dolist (buffer (buffer-list))
1937 (if (not (eq buffer gud-comint-buffer)) 1954 (if (not (eq buffer gud-comint-buffer))
1938 (save-excursion 1955 (with-current-buffer buffer
1939 (set-buffer buffer)
1940 (if (eq gud-minor-mode 'gdba) 1956 (if (eq gud-minor-mode 'gdba)
1941 (if (string-match "^\*.+*$" (buffer-name)) 1957 (if (string-match "^\*.+*$" (buffer-name))
1942 (kill-buffer nil) 1958 (kill-buffer nil)