diff options
author | Daniel Jacobowitz <drow@false.org> | 2003-08-04 19:28:17 +0000 |
---|---|---|
committer | Daniel Jacobowitz <drow@false.org> | 2003-08-04 19:28:17 +0000 |
commit | 95cd630eaeeb7c59acb5129df8a18b808dfabe23 (patch) | |
tree | 89da4e0060c64f0a38a3b8edbc790792e007633c | |
parent | 89b7795b147a1a8c4a7bcac4b9ffbb5462e856d1 (diff) | |
download | gdb-95cd630eaeeb7c59acb5129df8a18b808dfabe23.zip gdb-95cd630eaeeb7c59acb5129df8a18b808dfabe23.tar.gz gdb-95cd630eaeeb7c59acb5129df8a18b808dfabe23.tar.bz2 |
* tui-interp.c: Include "cli-out.h".
(tui_resume): Update tui_old_uiout's stream to gdb_stdout.
-rw-r--r-- | gdb/tui/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/tui/tui-interp.c | 17 |
2 files changed, 22 insertions, 0 deletions
diff --git a/gdb/tui/ChangeLog b/gdb/tui/ChangeLog index 40f4bd2..8eb6d33 100644 --- a/gdb/tui/ChangeLog +++ b/gdb/tui/ChangeLog @@ -1,3 +1,8 @@ +2003-08-04 Daniel Jacobowitz <drow@mvista.com> + + * tui-interp.c: Include "cli-out.h". + (tui_resume): Update tui_old_uiout's stream to gdb_stdout. + 2003-07-24 Stephane Carrez <stcarrez@nerim.fr> * tui.c (tui_rl_other_window): New function to switch the TUI active diff --git a/gdb/tui/tui-interp.c b/gdb/tui/tui-interp.c index 0c1effb..986ebb3 100644 --- a/gdb/tui/tui-interp.c +++ b/gdb/tui/tui-interp.c @@ -25,6 +25,7 @@ #include "event-top.h" #include "event-loop.h" #include "ui-out.h" +#include "cli-out.h" #include "tui/tuiData.h" #include "readline/readline.h" #include "tui/tuiWin.h" @@ -63,7 +64,23 @@ tui_init (void) static int tui_resume (void *data) { + struct ui_file *stream; + + /* gdb_setup_readline will change gdb_stdout. If the TUI was previously + writing to gdb_stdout, then set it to the new gdb_stdout afterwards. */ + + stream = cli_out_set_stream (tui_old_uiout, gdb_stdout); + if (stream != gdb_stdout) + { + cli_out_set_stream (tui_old_uiout, stream); + stream = NULL; + } + gdb_setup_readline (); + + if (stream != NULL) + cli_out_set_stream (tui_old_uiout, gdb_stdout); + if (tui_start_enabled) tui_enable (); return 1; |