This is the mail archive of the
mailing list for the GDB project.
Re: [PATCH] Unbuffer stdout and stderr on windows
- From: Eli Zaretskii <eliz at gnu dot org>
- To: Pedro Alves <palves at redhat dot com>
- Cc: yao at codesourcery dot com, gdb-patches at sourceware dot org, brobecker at adacore dot com
- Date: Fri, 16 Aug 2013 17:03:45 +0300
- Subject: Re: [PATCH] Unbuffer stdout and stderr on windows
- References: <51EE23F8 dot 1070905 at codesourcery dot com> <83wqohw4ee dot fsf at gnu dot org> <20130729192559 dot GA5348 at ednor dot casa dot cgf dot cx> <83d2q1xiyv dot fsf at gnu dot org> <51F6C7B2 dot 3020400 at redhat dot com> <20130731034045 dot GA5565 at ednor dot casa dot cgf dot cx> <20130812211105 dot GA11128 at adacore dot com> <8361v9piop dot fsf at gnu dot org> <20130815173618 dot GA6955 at ednor dot casa dot cgf dot cx> <83eh9uonlg dot fsf at gnu dot org> <20130815175940 dot GD6955 at ednor dot casa dot cgf dot cx> <520E1109 dot 7000304 at redhat dot com> <520E1C34 dot 2000907 at codesourcery dot com> <520E2B13 dot 8020706 at redhat dot com>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
> Date: Fri, 16 Aug 2013 14:37:23 +0100
> From: Pedro Alves <firstname.lastname@example.org>
> CC: email@example.com, firstname.lastname@example.org,
> Eli Zaretskii <email@example.com>
> How can it cause trouble? If anything, it should be fully buffered
> that causes trouble (for output not coming out when it should). I
> really can't see when ever would it be desirable to hold GDB output
> until the internal buffer fills. So if GDB is supposed to be working when
> IO is fully buffered, some other mechanism must be forcing flushes on
> line ends (probably the gdb_flush calls). And then, if that is supposed
> to work, the testsuite really isn't special, and what we have is that
> the flushing mechanism isn't being activated in all the necessary places.
If you are thinking about using GDB interactively from a Windows
console, these issues are not really applicable, because console
output has its own rules. And, as you point out, GDB flushes its
stdout quite a lot anyway. So the current stdout should really behave
close to line-buffered.
I suggest not to broaden the issue beyond the original problem, lest
we will be unable to solve it.