1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-29 19:48:19 +00:00

(gud-watch, gdb-display-buffer)

(gdb-display-source-buffer, gdb-put-breakpoint-icon)
(gdb-remove-breakpoint-icons, gdb-assembler-custom):
Look for window over visible frames.
This commit is contained in:
Nick Roberts 2004-05-02 23:04:20 +00:00
parent a89f5c79cf
commit 2b63b80f24

View File

@ -217,7 +217,7 @@ speedbar."
(gdb-enqueue-input
(list (concat "server interpreter mi \"-var-create - * " expr "\"\n")
`(lambda () (gdb-var-create-handler ,expr))))))
(select-window (get-buffer-window gud-comint-buffer)))
(select-window (get-buffer-window gud-comint-buffer 'visible)))
(defun gdb-goto-info ()
(interactive)
@ -1524,7 +1524,7 @@ the source buffer."
#'(lambda (win)
(if (eq gud-comint-buffer (window-buffer win))
(set-window-dedicated-p win t))))
(setq answer (get-buffer-window buf))
(setq answer (get-buffer-window buf 'visible))
(if (not answer)
(let ((window (get-lru-window 'visible)))
(if window
@ -1548,7 +1548,7 @@ the source buffer."
(if (eq gdb-selected-view 'source)
(gdb-display-buffer buffer)
(gdb-display-buffer (gdb-get-buffer 'gdb-assembler-buffer)))
(get-buffer-window buffer))
(get-buffer-window buffer 'visible))
;;; Shared keymap initialization:
@ -1557,11 +1557,11 @@ the source buffer."
(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 [locals] '("Locals" . gdb-frame-locals-buffer))
(define-key menu [threads] '("Threads" . gdb-frame-threads-buffer))
(define-key menu [registers] '("Registers" . gdb-frame-registers-buffer))
(define-key menu [locals] '("Locals" . gdb-frame-locals-buffer))
(define-key menu [frames] '("Stack" . gdb-frame-stack-buffer))
(define-key menu [breakpoints] '("Breakpoints" . gdb-frame-breakpoints-buffer))
(define-key menu [threads] '("Threads" . gdb-frame-threads-buffer))
; (define-key menu [assembler] '("Machine" . gdb-frame-assembler-buffer))
)
@ -1569,11 +1569,11 @@ the source buffer."
(define-key gud-menu-map [displays]
`(menu-item "GDB-Windows" ,menu :visible (eq gud-minor-mode 'gdba)))
(define-key menu [gdb] '("Gdb" . gdb-display-gdb-buffer))
(define-key menu [locals] '("Locals" . gdb-display-locals-buffer))
(define-key menu [threads] '("Threads" . gdb-display-threads-buffer))
(define-key menu [registers] '("Registers" . gdb-display-registers-buffer))
(define-key menu [locals] '("Locals" . gdb-display-locals-buffer))
(define-key menu [frames] '("Stack" . gdb-display-stack-buffer))
(define-key menu [breakpoints] '("Breakpoints" . gdb-display-breakpoints-buffer))
(define-key menu [threads] '("Threads" . gdb-display-threads-buffer))
; (define-key menu [assembler] '("Machine" . gdb-display-assembler-buffer))
)
@ -1805,11 +1805,10 @@ BUFFER nil or omitted means use the current buffer."
(when (< left-margin-width 2)
(save-current-buffer
(setq left-margin-width 2)
(if (get-buffer-window (current-buffer))
(set-window-margins (get-buffer-window
(current-buffer))
left-margin-width
right-margin-width))))
(if (get-buffer-window (current-buffer) 'visible)
(set-window-margins
(get-buffer-window (current-buffer) 'visible)
left-margin-width right-margin-width))))
(put-image
(if enabled
(or breakpoint-enabled-icon
@ -1833,11 +1832,10 @@ BUFFER nil or omitted means use the current buffer."
(when (< left-margin-width 2)
(save-current-buffer
(setq left-margin-width 2)
(if (get-buffer-window (current-buffer))
(set-window-margins (get-buffer-window
(current-buffer))
left-margin-width
right-margin-width))))
(if (get-buffer-window (current-buffer) 'visible)
(set-window-margins
(get-buffer-window (current-buffer) 'visible)
left-margin-width right-margin-width))))
(gdb-put-string (if enabled "B" "b") (1+ start)))))
(defun gdb-remove-breakpoint-icons (start end &optional remove-margin)
@ -1846,11 +1844,10 @@ BUFFER nil or omitted means use the current buffer."
(remove-images start end))
(when remove-margin
(setq left-margin-width 0)
(if (get-buffer-window (current-buffer))
(set-window-margins (get-buffer-window
(current-buffer))
left-margin-width
right-margin-width))))
(if (get-buffer-window (current-buffer) 'visible)
(set-window-margins
(get-buffer-window (current-buffer) 'visible)
left-margin-width right-margin-width))))
;;
@ -1901,7 +1898,7 @@ BUFFER nil or omitted means use the current buffer."
(if (re-search-forward address nil t)
(gdb-put-breakpoint-icon (eq flag ?y))))))))
(if (not (equal gdb-current-address "main"))
(set-window-point (get-buffer-window buffer) pos))))
(set-window-point (get-buffer-window buffer 'visible) pos))))
(defvar gdb-assembler-mode-map
(let ((map (make-sparse-keymap)))