Subject: Re: bug#40279: 26.3; Error: you did not specify -i=mi on GDB's command line!

From: Lars Ingebrigtsen <[email-masked]>
Date: Mon, 26 Oct 2020 15:19:33 +0100

Roland Coeurjoly <[email-masked]> writes:

> When I try to run:
> M-x gdb <RET> docker-compose -f ~/docker-services/dev/docker-compose.yml
> exec dev_rhel7 bash -c "gdb -i=mi" <RET>
> I get the following error:
> Error: you did not specify -i=mi on GDB's command line!

I don't know docker, but this is a message Emacs gives when gdb doesn't
start up and output the data that knows that it has been started
correctly.

So the message may be slightly misleading, but the problem seems to be
that gdb isn't started properly?  Here's the code:

(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.
      (let ((msg "Error: you did not specify -i=mi on GDB's command line!"))

So is there a problem with your gdb invocation via docker?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no