Speed up GDB's TUI output
authorDoug Evans <dje@google.com>
Wed, 4 Feb 2015 11:27:28 +0000 (12:27 +0100)
committerPedro Alves <palves@redhat.com>
Wed, 4 Feb 2015 11:27:28 +0000 (12:27 +0100)
commit518be979d905d8e8708c70149fdb3207aba53aa1
tree96dcab35188d23687ff67cb799b0d3351bbcc22f
parentf3853b34448594744f284fa96f26e41fd533a50d
Speed up GDB's TUI output

In the TUI mode, we call wrefresh after outputting every single
character.  This results in the I/O becoming very slow.  Fix this by
delaying refreshing the console window until an explicit flush of
gdb_stdout is requested, or a write to any other (unbuffered) file is
done.

2015-02-04  Doug Evans  <dje@google.com>
    Pedro Alves  <palves@redhat.com>
    Eli Zaretskii  <eliz@gnu.org>

PR tui/17810
* tui/tui-command.c (tui_refresh_cmd_win): New function.
* tui/tui-command.c (tui_refresh_cmd_win): Declare.
* tui/tui-file.c: #include tui/tui-command.h.
(tui_file_fputs): Refresh command window if stream is not gdb_stdout.
(tui_file_flush): Refresh command window if stream is gdb_stdout.
* tui/tui-io.c (tui_puts): Remove calls to wrefresh, fflush.
gdb/ChangeLog
gdb/tui/tui-command.c
gdb/tui/tui-command.h
gdb/tui/tui-file.c
gdb/tui/tui-io.c