Function: gdb--check-interpreter

gdb--check-interpreter is a byte-compiled function defined in gdb-mi.el.gz.

Signature

(gdb--check-interpreter FILTER PROC STRING)

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/gdb-mi.el.gz
(defun gdb--check-interpreter (filter proc string)
  (unless (zerop (length string))
    (remove-function (process-filter proc) #'gdb--check-interpreter)
    (unless (memq (aref string 0) '(?^ ?~ ?@ ?& ?* ?=))
      ;; Apparently we're not running with -i=mi (or we're, for
      ;; instance, debugging something inside a Docker instance with
      ;; Emacs on the outside).
      (let ((msg (substitute-command-keys
                  "Error: Either -i=mi wasn't specified on the GDB command line,\
 or the extra socket couldn't be established.  Consider using \\[gud-gdb] instead.")))
        (message msg)
        (setq string (concat (propertize msg 'font-lock-face 'error)
                             "\n" string)))
      ;; Use the old gud-gbd filter, not because it works, but because it
      ;; will properly display GDB's answers rather than hanging waiting for
      ;; answers that aren't coming.
      (setq-local gud-marker-filter #'gud-gdb-marker-filter))
    (funcall filter proc string)))