Function: gdb-gud-context-command

gdb-gud-context-command is a byte-compiled function defined in gdb-mi.el.gz.

Signature

(gdb-gud-context-command COMMAND &optional NOALL)

Documentation

When gdb-non-stop is t, add --thread option to COMMAND if gdb-gud-control-all-threads is nil and --all option otherwise. If NOALL is t, always add --thread option no matter what gdb-gud-control-all-threads value is.

When gdb-non-stop is nil, return COMMAND unchanged.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/gdb-mi.el.gz
;; noall is used for commands which don't take --all, but only
;; --thread.
(defun gdb-gud-context-command (command &optional noall)
  "When `gdb-non-stop' is t, add --thread option to COMMAND if
`gdb-gud-control-all-threads' is nil and --all option otherwise.
If NOALL is t, always add --thread option no matter what
`gdb-gud-control-all-threads' value is.

When `gdb-non-stop' is nil, return COMMAND unchanged."
  (if gdb-non-stop
      (if (and gdb-gud-control-all-threads
               (not noall)
	       gdb-supports-non-stop)
          (concat command " --all ")
        (gdb-current-context-command command))
    command))