]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* cli/cli-interp.c (cli_interpreter_resume): Update the
authorDaniel Jacobowitz <drow@false.org>
Thu, 3 Jul 2003 14:49:09 +0000 (14:49 +0000)
committerDaniel Jacobowitz <drow@false.org>
Thu, 3 Jul 2003 14:49:09 +0000 (14:49 +0000)
cli_uiout's stream to gdb_stdout.

gdb/ChangeLog
gdb/cli/cli-interp.c

index e036bdba7a28ab0ad331875dd3c5d26a30601c99..17b949b5a7b0e7099fc8eb71ce4d90e236a0b78e 100644 (file)
@@ -1,3 +1,8 @@
+2003-07-03  Daniel Jacobowitz  <drow@mvista.com>
+
+       * cli/cli-interp.c (cli_interpreter_resume): Update the
+       cli_uiout's stream to gdb_stdout.
+
 2003-07-02  Daniel Jacobowitz  <drow@mvista.com>
 
        * cli/cli-logging.c (pop_output_files): Add void to function
index 45679f07b980090ac1994a1f04d5337fbd9fbaa3..6abb24ddffe100c7147a4d7fd7065829c111eaf2 100644 (file)
@@ -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;
 }