From: Daniel Jacobowitz Date: Thu, 3 Jul 2003 14:49:09 +0000 (+0000) Subject: * cli/cli-interp.c (cli_interpreter_resume): Update the X-Git-Tag: cagney_x86i386-20030821-branchpoint~116 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9084823a53e327e30b873e823c395c6e34530f87;p=thirdparty%2Fbinutils-gdb.git * cli/cli-interp.c (cli_interpreter_resume): Update the cli_uiout's stream to gdb_stdout. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index e036bdba7a2..17b949b5a7b 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2003-07-03 Daniel Jacobowitz + + * cli/cli-interp.c (cli_interpreter_resume): Update the + cli_uiout's stream to gdb_stdout. + 2003-07-02 Daniel Jacobowitz * cli/cli-logging.c (pop_output_files): Add void to function 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; }