Mercurial > emacs
changeset 68664:e444fe32e1b4
(gdb-post-prompt): Regenerate breakpoints
buffer if necessary.
(gdb-delete-frame-or-window): New function.
(gdb-breakpoints-mode-map): Bind "q" to it.
author | Nick Roberts <nickrob@snap.net.nz> |
---|---|
date | Tue, 07 Feb 2006 06:57:27 +0000 |
parents | 103edc4c0d82 |
children | c4dbf24d637f |
files | lisp/progmodes/gdb-ui.el |
diffstat | 1 files changed, 13 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/progmodes/gdb-ui.el Tue Feb 07 06:50:12 2006 +0000 +++ b/lisp/progmodes/gdb-ui.el Tue Feb 07 06:57:27 2006 +0000 @@ -77,16 +77,9 @@ ;;; TODO: ;; 1) Use MI command -data-read-memory for memory window. -;; 2) Highlight changed register values (use MI commands -;; -data-list-register-values and -data-list-changed-registers instead -;; of 'info registers' after release of 22.1. -;; 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 +;; 2) Use tree-widget.el instead of the speedbar for watch-expressions? +;; 3) Mark breakpoint locations on scroll-bar of source buffer? +;; 4) With gud-print and gud-pstar, print the variable name in the GUD ;; buffer instead of the value's history number. ;;; Code: @@ -1192,6 +1185,8 @@ (unless (or gdb-pending-triggers gdb-first-post-prompt) (gdb-get-selected-frame) (gdb-invalidate-frames) + ;; Regenerate breakpoints buffer in case it has been inadvertantly deleted. + (gdb-get-create-buffer 'gdb-breakpoints-buffer) (gdb-invalidate-breakpoints) ;; Do this through gdb-get-selected-frame -> gdb-frame-handler ;; so gdb-frame-address is updated. @@ -1645,12 +1640,19 @@ (define-key map [menu-bar breakpoints] (cons "Breakpoints" menu)) (define-key map " " 'gdb-toggle-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 [mouse-2] 'gdb-goto-breakpoint) (define-key map [follow-link] 'mouse-face) 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 () "Major mode for gdb breakpoints.