Commit bfd21f54 authored by Nick Roberts's avatar Nick Roberts
Browse files

(gud-watch): Use save-selected-window in

case GUD buffer is not visible.
(gdb-goto-breakpoint): Try to force display in source buffer.
(gdb-frame-gdb-buffer): Copy other similar functions.
(gdb-restore-windows): Don't display source if not asked for.
(gdb-assembler-buffer-name): Don't capitalise.
parent 2b02eddf
......@@ -457,6 +457,7 @@ With arg, use separate IO iff arg is positive."
"Watch expression at point."
(require 'tooltip)
(let ((expr (tooltip-identifier-from-point (point))))
(if (and (string-equal gdb-current-language "c")
gdb-use-colon-colon-notation gdb-selected-frame)
......@@ -470,8 +471,7 @@ With arg, use separate IO iff arg is positive."
(if (eq gud-minor-mode 'gdba)
(concat "server interpreter mi \"-var-create - * " expr "\"\n")
(concat"-var-create - * " expr "\n"))
`(lambda () (gdb-var-create-handler ,expr))))))
(select-window (get-buffer-window gud-comint-buffer 0)))
`(lambda () (gdb-var-create-handler ,expr))))))))
(defconst gdb-var-create-regexp
......@@ -1582,6 +1582,9 @@ static char *magick[] = {
"Display the breakpoint location specified at current line."
(interactive (list last-input-event))
(if event (mouse-set-point event))
;; Hack to stop gdb-goto-breakpoint displaying in GUD buffer.
(let ((window (get-buffer-window gud-comint-buffer)))
(if window (save-selected-window (select-window window))))
(beginning-of-line 1)
(if (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba))
......@@ -2363,9 +2366,9 @@ corresponding to the mode line clicked."
(defun gdb-frame-gdb-buffer ()
"Display GUD buffer in a new frame."
(select-frame (make-frame gdb-frame-parameters))
(switch-to-buffer (gdb-get-create-buffer 'gdba))
(set-window-dedicated-p (selected-window) t))
(let ((special-display-regexps (append special-display-regexps '(".*")))
(special-display-frame-alist gdb-frame-parameters))
(display-buffer (gdb-get-create-buffer 'gdb-stack-buffer))))
(defun gdb-display-gdb-buffer ()
"Display GUD buffer."
......@@ -2440,13 +2443,14 @@ This arrangement depends on the value of `gdb-many-windows'."
(if gdb-many-windows
(when (or gud-last-last-frame gdb-show-main)
(other-window 1)
(if gud-last-last-frame
(gud-find-file (car gud-last-last-frame))
(gud-find-file gdb-main-file)))
(other-window 1)))
(other-window 1))))
(defun gdb-reset ()
"Exit a debugging session cleanly.
......@@ -2730,7 +2734,7 @@ BUFFER nil or omitted means use the current buffer."
(defun gdb-assembler-buffer-name ()
(with-current-buffer gud-comint-buffer
(concat "*Disassembly of " (gdb-get-target-string) "*")))
(concat "*disassembly of " (gdb-get-target-string) "*")))
(defun gdb-display-assembler-buffer ()
"Display disassembly view."
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment