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

From: Eli Zaretskii <[email-masked]>
Date: Tue, 27 Oct 2020 22:09:23 +0200

> From: Lars Ingebrigtsen <[email-masked]>
> Date: Tue, 27 Oct 2020 20:14:07 +0100
> Cc: [email-masked]
> 
> I tried looking at the VC logs to see what the point of the
> inferior-tty-set command was, but the only mention I found was:
> 
>      (gdb-inferior-io--init-proc): Don't send "-inferior-tty" command
>      if the TTY name is nil or empty (which happens when communicating
>      with the inferior via pipes, e.g. on MS-Windows).
> 
> Which just disables it on Windows?

Yes.  Because on Windows this is nothing but trouble.

> Hm...  it was introduced below, but doesn't really say why.
> 
> commit f30d612a7a628828baa7c333629a10295605291b
> Author:     Chong Yidong <[email-masked]>
> AuthorDate: Fri Apr 20 14:39:29 2012 +0800
> 
> And as far as I can tell, gdb runs just fine without it, even on
> GNU/Linux?

It is needed to redirect the I/O of the program being debugged into a
separate buffer, so it doesn't get mixed with the interaction between
the user and GDB.  gdb-many-windows creates, among others, a buffer
where the program's I/O is redirected.