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

(gdb-post-prompt): Regenerate breakpoints

buffer if necessary.
(gdb-delete-frame-or-window): New function.
(gdb-breakpoints-mode-map): Bind "q" to it.
parent 25ef2475
...@@ -77,16 +77,9 @@ ...@@ -77,16 +77,9 @@
;;; TODO: ;;; TODO:
;; 1) Use MI command -data-read-memory for memory window. ;; 1) Use MI command -data-read-memory for memory window.
;; 2) Highlight changed register values (use MI commands ;; 2) Use tree-widget.el instead of the speedbar for watch-expressions?
;; -data-list-register-values and -data-list-changed-registers instead ;; 3) Mark breakpoint locations on scroll-bar of source buffer?
;; of 'info registers' after release of 22.1. ;; 4) With gud-print and gud-pstar, print the variable name in the GUD
;; 3) Use tree-widget.el instead of the speedbar for watch-expressions?
;; 4) Mark breakpoint locations on scroll-bar of source buffer?
;; 5) After release of 22.1, use "-var-list-children --all-values"
;; and "-stack-list-locals --simple-values" which need GDB 6.1 onwards.
;; 6) After release of 22.1, use "-var-update --all-values" which needs
;; GDB 6.4 onwards.
;; 7) With gud-print and gud-pstar, print the variable name in the GUD
;; buffer instead of the value's history number. ;; buffer instead of the value's history number.
;;; Code: ;;; Code:
...@@ -1192,6 +1185,8 @@ happens to be appropriate." ...@@ -1192,6 +1185,8 @@ happens to be appropriate."
(unless (or gdb-pending-triggers gdb-first-post-prompt) (unless (or gdb-pending-triggers gdb-first-post-prompt)
(gdb-get-selected-frame) (gdb-get-selected-frame)
(gdb-invalidate-frames) (gdb-invalidate-frames)
;; Regenerate breakpoints buffer in case it has been inadvertantly deleted.
(gdb-get-create-buffer 'gdb-breakpoints-buffer)
(gdb-invalidate-breakpoints) (gdb-invalidate-breakpoints)
;; Do this through gdb-get-selected-frame -> gdb-frame-handler ;; Do this through gdb-get-selected-frame -> gdb-frame-handler
;; so gdb-frame-address is updated. ;; so gdb-frame-address is updated.
...@@ -1645,12 +1640,19 @@ static char *magick[] = { ...@@ -1645,12 +1640,19 @@ static char *magick[] = {
(define-key map [menu-bar breakpoints] (cons "Breakpoints" menu)) (define-key map [menu-bar breakpoints] (cons "Breakpoints" menu))
(define-key map " " 'gdb-toggle-breakpoint) (define-key map " " 'gdb-toggle-breakpoint)
(define-key map "D" 'gdb-delete-breakpoint) (define-key map "D" 'gdb-delete-breakpoint)
(define-key map "q" 'kill-this-buffer) ;; Don't bind "q" to kill-this-buffer as we need it for breakpoint icons.
(define-key map "q" 'gdb-delete-frame-or-window)
(define-key map "\r" 'gdb-goto-breakpoint) (define-key map "\r" 'gdb-goto-breakpoint)
(define-key map [mouse-2] 'gdb-goto-breakpoint) (define-key map [mouse-2] 'gdb-goto-breakpoint)
(define-key map [follow-link] 'mouse-face) (define-key map [follow-link] 'mouse-face)
map)) map))
(defun gdb-delete-frame-or-window ()
"Delete frame if there is only one window. Otherwise delete the window."
(interactive)
(if (one-window-p) (delete-frame)
(delete-window)))
(defun gdb-breakpoints-mode () (defun gdb-breakpoints-mode ()
"Major mode for gdb breakpoints. "Major mode for gdb breakpoints.
......
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