Mercurial > emacs
changeset 62826:787677122f52
(gdb-all-registers): New variable.
(gdb-registers-buffer, toggle-gdb-all-registers):
Toggle display of floating point registers.
(gdb-registers-mode-map): Bind SPC to toggle-gdb-all-registers.
author | Nick Roberts <nickrob@snap.net.nz> |
---|---|
date | Fri, 27 May 2005 20:56:43 +0000 |
parents | a6b83140d7d1 |
children | 2ab40e47ee9c 63b7247f4be6 |
files | lisp/progmodes/gdb-ui.el |
diffstat | 1 files changed, 24 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/progmodes/gdb-ui.el Fri May 27 20:54:58 2005 +0000 +++ b/lisp/progmodes/gdb-ui.el Fri May 27 20:56:43 2005 +0000 @@ -1659,13 +1659,20 @@ ;; Registers buffer. ;; +(defcustom gdb-all-registers nil + "Non-nil means include floating-point registers." + :type 'boolean + :group 'gud + :version "22.1") + (gdb-set-buffer-rules 'gdb-registers-buffer 'gdb-registers-buffer-name 'gdb-registers-mode) (def-gdb-auto-updated-buffer gdb-registers-buffer gdb-invalidate-registers - (concat gdb-server-prefix "info registers\n") + (concat + gdb-server-prefix "info " (if gdb-all-registers "all-") "registers\n") gdb-info-registers-handler gdb-info-registers-custom) @@ -1674,6 +1681,7 @@ (defvar gdb-registers-mode-map (let ((map (make-sparse-keymap))) (suppress-keymap map) + (define-key map " " 'toggle-gdb-all-registers) (define-key map "q" 'kill-this-buffer) map)) @@ -1683,7 +1691,7 @@ \\{gdb-registers-mode-map}" (kill-all-local-variables) (setq major-mode 'gdb-registers-mode) - (setq mode-name "Registers") + (setq mode-name "Registers:") (setq buffer-read-only t) (use-local-map gdb-registers-mode-map) (run-mode-hooks 'gdb-registers-mode-hook) @@ -1706,6 +1714,20 @@ (special-display-frame-alist gdb-frame-parameters)) (display-buffer (gdb-get-create-buffer 'gdb-registers-buffer)))) +(defun toggle-gdb-all-registers () + "Toggle the display of floating-point registers." + (interactive) + (if gdb-all-registers + (progn + (setq gdb-all-registers nil) + (with-current-buffer (gdb-get-buffer 'gdb-registers-buffer) + (setq mode-name "Registers:"))) + (setq gdb-all-registers t) + (with-current-buffer (gdb-get-buffer 'gdb-registers-buffer) + (setq mode-name "Registers:All"))) + (gdb-invalidate-registers)) + + ;; Memory buffer. ;; (defcustom gdb-memory-repeat-count 32