diff options
author | Doug Evans <dje@google.com> | 2015-02-04 12:27:28 +0100 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2015-02-04 12:27:28 +0100 |
commit | 518be979d905d8e8708c70149fdb3207aba53aa1 (patch) | |
tree | 96dcab35188d23687ff67cb799b0d3351bbcc22f /gdb/tui/tui-command.h | |
parent | f3853b34448594744f284fa96f26e41fd533a50d (diff) | |
download | binutils-gdb-518be979d905d8e8708c70149fdb3207aba53aa1.tar.gz |
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.
Diffstat (limited to 'gdb/tui/tui-command.h')
-rw-r--r-- | gdb/tui/tui-command.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gdb/tui/tui-command.h b/gdb/tui/tui-command.h index 8cc5be4f79d..ede2ecc9343 100644 --- a/gdb/tui/tui-command.h +++ b/gdb/tui/tui-command.h @@ -24,4 +24,7 @@ extern unsigned int tui_dispatch_ctrl_char (unsigned int); +/* Refresh the command window. */ +extern void tui_refresh_cmd_win (void); + #endif |