Function: gdb-update-gud-running
gdb-update-gud-running is a byte-compiled function defined in
gdb-mi.el.gz.
Signature
(gdb-update-gud-running)
Documentation
Set gud-running according to the state of current thread.
gdb-frame-number is set to 0 if current thread is now stopped.
Note that when gdb-gud-control-all-threads is t, gud-running
cannot be reliably used to determine whether or not execution
control buttons should be shown in menu or toolbar. Use
gdb-running-threads-count and gdb-stopped-threads-count
instead.
For all-stop mode, thread information is unavailable while target is running.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/gdb-mi.el.gz
(defun gdb-update-gud-running ()
"Set `gud-running' according to the state of current thread.
`gdb-frame-number' is set to 0 if current thread is now stopped.
Note that when `gdb-gud-control-all-threads' is t, `gud-running'
cannot be reliably used to determine whether or not execution
control buttons should be shown in menu or toolbar. Use
`gdb-running-threads-count' and `gdb-stopped-threads-count'
instead.
For all-stop mode, thread information is unavailable while target
is running."
(let ((old-value gud-running))
(setq gud-running
(string= (gdb-mi--field (gdb-current-buffer-thread) 'state)
"running"))
;; Set frame number to "0" when _current_ threads stops.
(when (and (gdb-current-buffer-thread)
(not (eq gud-running old-value)))
(setq gdb-frame-number "0"))))