Function: gdb-toggle-switch-when-another-stopped

gdb-toggle-switch-when-another-stopped is an interactive and byte-compiled function defined in gdb-mi.el.gz.

Signature

(gdb-toggle-switch-when-another-stopped &optional INTERACTIVELY)

Documentation

Toggle whether to switch to stopped thread.

In an interactive call, record this option as a candidate for saving by "Save Options" in Custom buffers.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/gdb-mi.el.gz
(let ((menu (make-sparse-keymap "GDB-MI")))
  (define-key menu [gdb-customize]
    `(menu-item "Customize" ,(lambda () (interactive) (customize-group 'gdb))
      :help "Customize Gdb Graphical Mode options."))
  (define-key menu [gdb-many-windows]
    '(menu-item "Display Other Windows" gdb-many-windows
      :help "Toggle display of locals, stack and breakpoint information"
      :button (:toggle . gdb-many-windows)))
  (define-key menu [sep1]
    '(menu-item "--"))
  (define-key menu [all-threads]
    `(menu-item "GUD controls all threads"
      ,(lambda ()
         (interactive)
         (setq gdb-gud-control-all-threads t))
      :help "GUD start/stop commands apply to all threads"
      :button (:radio . gdb-gud-control-all-threads)))
  (define-key menu [current-thread]
    `(menu-item "GUD controls current thread"
      ,(lambda ()
         (interactive)
         (setq gdb-gud-control-all-threads nil))
      :help "GUD start/stop commands apply to current thread only"
      :button (:radio . (not gdb-gud-control-all-threads))))
  (define-key menu [sep2]
    '(menu-item "--"))
  (define-key menu [gdb-customize-reasons]
    `(menu-item "Customize switching..."
      ,(lambda ()
         (interactive)
         (customize-option 'gdb-switch-reasons))))
  (define-key menu [gdb-switch-when-another-stopped]
    (menu-bar-make-toggle-command
     gdb-toggle-switch-when-another-stopped
     gdb-switch-when-another-stopped
     "Automatically switch to stopped thread"
     "GDB thread switching %s" "Switch to stopped thread"))
  (define-key gud-menu-map [mi]
    `(menu-item "GDB-MI" ,menu :visible (eq gud-minor-mode 'gdbmi))))