summaryrefslogtreecommitdiff
path: root/gdb/cli
diff options
context:
space:
mode:
authorDaniel Jacobowitz <dan@debian.org>2003-07-03 14:49:26 +0000
committerDaniel Jacobowitz <dan@debian.org>2003-07-03 14:49:26 +0000
commitdc5200c4a8e10ba1025fba23cd06dbe09d9df3ba (patch)
tree1e531d9761ac98ba61dcc9fa26d8dc68271ce400 /gdb/cli
parentba41a1befbaacd4433f86534011b7979329e82ef (diff)
downloadgdb-dc5200c4a8e10ba1025fba23cd06dbe09d9df3ba.tar.gz
* cli/cli-interp.c (cli_interpreter_resume): Update the
cli_uiout's stream to gdb_stdout.
Diffstat (limited to 'gdb/cli')
-rw-r--r--gdb/cli/cli-interp.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/gdb/cli/cli-interp.c b/gdb/cli/cli-interp.c
index 45679f07b98..6abb24ddffe 100644
--- a/gdb/cli/cli-interp.c
+++ b/gdb/cli/cli-interp.c
@@ -53,8 +53,25 @@ cli_interpreter_init (void)
static int
cli_interpreter_resume (void *data)
{
+ struct ui_file *stream;
+
/*sync_execution = 1; */
+
+ /* gdb_setup_readline will change gdb_stdout. If the CLI was previously
+ writing to gdb_stdout, then set it to the new gdb_stdout afterwards. */
+
+ stream = cli_out_set_stream (cli_uiout, gdb_stdout);
+ if (stream != gdb_stdout)
+ {
+ cli_out_set_stream (cli_uiout, stream);
+ stream = NULL;
+ }
+
gdb_setup_readline ();
+
+ if (stream != NULL)
+ cli_out_set_stream (cli_uiout, gdb_stdout);
+
return 1;
}