This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Speed up "gdb -tui" output
- From: Eli Zaretskii <eliz at gnu dot org>
- To: Pedro Alves <palves at redhat dot com>
- Cc: dje at google dot com, gdb-patches at sourceware dot org
- Date: Mon, 19 Jan 2015 19:52:13 +0200
- Subject: Re: [PATCH] Speed up "gdb -tui" output
- Authentication-results: sourceware.org; auth=none
- References: <83zj9v7urq dot fsf at gnu dot org> <CADPb22Q7oD3K-dYkngEPDBbV++mLCKifTEmvJczQ=0h2FX0yXA at mail dot gmail dot com> <54AD4E22 dot 1010106 at redhat dot com> <83mw5u79t7 dot fsf at gnu dot org> <CADPb22QqTE+yq9RSRmvBiu0tdy++8S40D8xzKi6k8nLYmiN48g at mail dot gmail dot com> <83fvbm784e dot fsf at gnu dot org> <CADPb22T=uuHjDrsxrOyjh2XS0=wf_HxkxNGYHC_hAsvr7saJjw at mail dot gmail dot com> <83a91u75fe dot fsf at gnu dot org> <54ADB35F dot 7050200 at redhat dot com>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
> Date: Wed, 07 Jan 2015 22:29:51 +0000
> From: Pedro Alves <palves@redhat.com>
> 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?