From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25147 invoked by alias); 19 Jan 2015 17:52:27 -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 25136 invoked by uid 89); 19 Jan 2015 17:52:26 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,SPF_SOFTFAIL autolearn=no version=3.3.2 X-HELO: mtaout29.012.net.il Received: from mtaout29.012.net.il (HELO mtaout29.012.net.il) (80.179.55.185) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 19 Jan 2015 17:52:25 +0000 Received: from conversion-daemon.mtaout29.012.net.il by mtaout29.012.net.il (HyperSendmail v2007.08) id <0NIF00500QJ4XG00@mtaout29.012.net.il> for gdb-patches@sourceware.org; Mon, 19 Jan 2015 19:49:03 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout29.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NIF001JYQTRG650@mtaout29.012.net.il>; Mon, 19 Jan 2015 19:49:03 +0200 (IST) Date: Mon, 19 Jan 2015 17:52:00 -0000 From: Eli Zaretskii Subject: Re: [PATCH] Speed up "gdb -tui" output In-reply-to: <54ADB35F.7050200@redhat.com> To: Pedro Alves Cc: dje@google.com, gdb-patches@sourceware.org Reply-to: Eli Zaretskii Message-id: <83k30iy7xu.fsf@gnu.org> References: <83zj9v7urq.fsf@gnu.org> <54AD4E22.1010106@redhat.com> <83mw5u79t7.fsf@gnu.org> <83fvbm784e.fsf@gnu.org> <83a91u75fe.fsf@gnu.org> <54ADB35F.7050200@redhat.com> X-IsSubscribed: yes X-SW-Source: 2015-01/txt/msg00527.txt.bz2 > Date: Wed, 07 Jan 2015 22:29:51 +0000 > From: Pedro Alves > CC: gdb-patches@sourceware.org > > I think something like this should work. I'm not really seeing a point > for those fflush(stdout)'s, btw. Note that tui_stream->ts_filestream is > only ever used in tui_file_isatty; it's never written to. This seems to fix the problem, thanks. Note that I didn't try every possible way of getting into fprintf_unfiltered and fputs_unfiltered, there are too many of them. A couple of minor comments below. > @@ -239,7 +239,8 @@ tui_file_flush (struct ui_file *file) > case astring: > break; > case afile: > - fflush (stream->ts_filestream); > + if (file == tui_stdout) > + tui_flush_stdout (); > break; I think this should be done for any file but stderr. > @@ -412,6 +447,7 @@ tui_rl_display_match_list (char **matches, int len, int max) > > /* Screen dimension correspond to the TUI command window. */ > int screenwidth = TUI_CMD_WIN->generic.width; > + WINDOW *w = TUI_CMD_WIN->generic.handle; Is this needed?