From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3834 invoked by alias); 16 Aug 2013 14:03:16 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 3824 invoked by uid 89); 16 Aug 2013 14:03:16 -0000 X-Spam-SWARE-Status: No, score=-4.1 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_NO,SPF_SOFTFAIL autolearn=no version=3.3.2 Received: from mtaout20.012.net.il (HELO mtaout20.012.net.il) (80.179.55.166) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Fri, 16 Aug 2013 14:03:15 +0000 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0MRM00I00N00LQ00@a-mtaout20.012.net.il> for gdb-patches@sourceware.org; Fri, 16 Aug 2013 17:03:12 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MRM00I7AN1BF540@a-mtaout20.012.net.il>; Fri, 16 Aug 2013 17:03:12 +0300 (IDT) Date: Fri, 16 Aug 2013 14:03:00 -0000 From: Eli Zaretskii Subject: Re: [PATCH] Unbuffer stdout and stderr on windows In-reply-to: <520E2B13.8020706@redhat.com> To: Pedro Alves Cc: yao@codesourcery.com, gdb-patches@sourceware.org, brobecker@adacore.com Reply-to: Eli Zaretskii Message-id: <83r4dtn35q.fsf@gnu.org> References: <51EE23F8.1070905@codesourcery.com> <83wqohw4ee.fsf@gnu.org> <20130729192559.GA5348@ednor.casa.cgf.cx> <83d2q1xiyv.fsf@gnu.org> <51F6C7B2.3020400@redhat.com> <20130731034045.GA5565@ednor.casa.cgf.cx> <20130812211105.GA11128@adacore.com> <8361v9piop.fsf@gnu.org> <20130815173618.GA6955@ednor.casa.cgf.cx> <83eh9uonlg.fsf@gnu.org> <20130815175940.GD6955@ednor.casa.cgf.cx> <520E1109.7000304@redhat.com> <520E1C34.2000907@codesourcery.com> <520E2B13.8020706@redhat.com> X-SW-Source: 2013-08/txt/msg00429.txt.bz2 > Date: Fri, 16 Aug 2013 14:37:23 +0100 > From: Pedro Alves > CC: gdb-patches@sourceware.org, brobecker@adacore.com, > Eli Zaretskii > > 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.