1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

Tweak the gdb-mi error message

* lisp/progmodes/gdb-mi.el (gdb--check-interpreter): Make the
error message less misleading (bug#40279).
This commit is contained in:
Lars Ingebrigtsen 2020-10-30 13:18:47 +01:00
parent f018cffca0
commit daa21fb895

View file

@ -737,8 +737,10 @@ NOARG must be t when this macro is used outside `gud-def'."
(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.
(let ((msg "Error: you did not specify -i=mi on GDB's command line!"))
;; 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 "Error: Either -i=mi wasn't specified on the GDB command line, or the extra socket couldn't be established. Consider using `M-x gud-gdb' instead."))
(message msg)
(setq string (concat (propertize msg 'font-lock-face 'error)
"\n" string)))