[PATCH] Speed up "gdb -tui" output
Eli Zaretskii
eliz@gnu.org
Mon Jan 19 17:52:00 GMT 2015
> 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?
More information about the Gdb-patches
mailing list