Re: MI testsuite to use PTY for inferior

Daniel Jacobowitz
2005-08-02T03:50:24Z

On Tue, Aug 02, 2005 at 06:45:28AM +0300, Eli Zaretskii wrote:
> > Date: Mon, 1 Aug 2005 16:52:42 -0400
> > From: Daniel Jacobowitz <drow@false.org>
> > Cc: Mark Kettenis <mark.kettenis@xs4all.nl>, gdb-patches@sources.redhat.com
> >
> > You can't fix it via termios; it isn't a property of the terminal (and
> > we don't have a terminal, anyway). It's set by the application startup
> > code based on the result of isatty() on fd 0, usually - at least both
> > mingw32 and GNU/Linux do it this way.
>
> If this is the buffering you are worried with, it can be fixed with a
> call to setvbuf, right?

Yes, but the problem's that the buffering is in the program being
debugged. It's not the buffering of the GDB MI stream that's the
problem, but the fact that the stdout of the program you're debugging
would suddenly become block buffered instead of line buffered, if you
fed it to a pipe when it expects a TTY.

--
Daniel Jacobowitz
CodeSourcery, LLC