Commit 9594f929 authored by Nick Roberts's avatar Nick Roberts
Browse files

(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.
parent be820e8d
......@@ -1659,13 +1659,20 @@ static char *magick[] = {
;; 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
(def-gdb-auto-updated-buffer gdb-registers-buffer
(concat gdb-server-prefix "info registers\n")
gdb-server-prefix "info " (if gdb-all-registers "all-") "registers\n")
......@@ -1674,6 +1681,7 @@ static char *magick[] = {
(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)
......@@ -1683,7 +1691,7 @@ static char *magick[] = {
(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 @@ static char *magick[] = {
(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."
(if gdb-all-registers
(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")))
;; Memory buffer.
(defcustom gdb-memory-repeat-count 32
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