(gdb-clear-partial-output)
(setq gdb-display-in-progress t))
-(defvar gdb-expression-buffer-name)
-(defvar gdb-display-number)
-(defvar gdb-dive-display-number)
+(defvar gdb-expression-buffer-name nil)
+(defvar gdb-display-number nil)
+(defvar gdb-dive-display-number nil)
(defun gdb-display-number-end (ignored)
(set-buffer (gdb-get-buffer 'gdb-partial-output-buffer))
(gdb-expressions-mode)
(setq gdb-dive-display-number number)))
(set-buffer (get-buffer-create gdb-expression-buffer-name))
- (gdb-expressions-mode)
- (if (and (display-graphic-p) (not gdb-dive))
+ (if (display-graphic-p)
(catch 'frame-exists
(dolist (frame (frame-list))
(if (string-equal (frame-parameter frame 'name)
gdb-expression-buffer-name)
(throw 'frame-exists nil)))
+ (gdb-expressions-mode)
(make-frame `((height . ,gdb-window-height)
(width . ,gdb-window-width)
(tool-bar-lines . nil)
(menu-bar-lines . nil)
(minibuffer . nil))))
+ (gdb-expressions-mode)
(gdb-display-buffer (get-buffer gdb-expression-buffer-name)))))
(set-buffer (gdb-get-buffer 'gdb-partial-output-buffer))
(setq gdb-dive nil))
-(defvar gdb-nesting-level)
-(defvar gdb-expression)
-(defvar gdb-point)
-(defvar gdb-annotation-arg)
+(defvar gdb-nesting-level nil)
+(defvar gdb-expression nil)
+(defvar gdb-point nil)
+(defvar gdb-annotation-arg nil)
(defun gdb-delete-line ()
"Delete the current line."
'local-map gdb-dive-map)))
(delete-region start end)))
-(defvar gdb-values)
+(defvar gdb-values nil)
(defun gdb-array-format ()
(while (re-search-forward "##" nil t)
(setq gdb-nesting-level (- gdb-nesting-level 1))
(gdb-array-format)))))
-(defvar gdb-array-start)
-(defvar gdb-array-stop)
+(defvar gdb-array-start nil)
+(defvar gdb-array-stop nil)
(defvar gdb-array-slice-map
(let ((map (make-sparse-keymap)))
- (define-key map [mouse-2] 'gdb-array-slice)
+ (define-key map "\r" 'gdb-array-slice)
+ (define-key map [mouse-2] 'gdb-mouse-array-slice)
map))
-(defun gdb-array-slice (event)
+(defun gdb-mouse-array-slice (event)
"Select an array slice to display."
(interactive "e")
(mouse-set-point event)
+ (gdb-array-slice))
+
+(defun gdb-array-slice ()
+ (interactive)
(save-excursion
(let ((n -1) (stop 0) (start 0) (point (point)))
(beginning-of-line)
(aset gdb-array-stop n stop)))
(gdb-array-format1))
-(defvar gdb-display-string)
-(defvar gdb-array-size)
+(defvar gdb-display-string nil)
+(defvar gdb-array-size nil)
(defun gdb-array-format1 ()
(setq gdb-display-string "")
"Display other windows" "Many Windows %s"
"Display locals, stack and breakpoint information"))
- (let ((menu (make-sparse-keymap "GDB-Frames")))
+(let ((menu (make-sparse-keymap "GDB-Frames")))
(define-key gud-menu-map [frames]
`(menu-item "GDB-Frames" ,menu :visible (eq gud-minor-mode 'gdba)))
(define-key menu [gdb] '("Gdb" . gdb-frame-gdb-buffer))
(define-key menu [assembler] '(menu-item "Assembler" gdb-view-assembler
:help "Display assembler only"
:button (:radio . (eq gdb-selected-view 'assembler))))
- (define-key menu [source] '(menu-item "Source" gdb-view-source
+ (define-key menu [source] '(menu-item "Source" gdb-view-source-function
:help "Display source only"
:button (:radio . (eq gdb-selected-view 'source)))))
(defvar gdb-main-file nil "Source file from which program execution begins.")
-(defun gdb-view-source()
+(defun gdb-view-source-function ()
(interactive)
(if gdb-view-source
(if gud-last-last-frame