summaryrefslogtreecommitdiff
path: root/gdb/cli/cli-interp.c
diff options
context:
space:
mode:
authorDavid Carlton <carlton@bactrian.org>2003-08-05 17:13:34 +0000
committerDavid Carlton <carlton@bactrian.org>2003-08-05 17:13:34 +0000
commitf8dcf85418c934b9c26092856b7864e2f9ae9f6b (patch)
tree623472f1807b7babb42baf69a207275592536755 /gdb/cli/cli-interp.c
parent2c4081cec535db3c8cc055fbdd22779a5a32ba9c (diff)
downloadgdb-f8dcf85418c934b9c26092856b7864e2f9ae9f6b.tar.gz
2003-08-05 David Carlton <carlton@kealia.com>
* configure.in (build_warnings): Delete -Wformat-nonliteral. * configure (build_warnings): Ditto. * Merge with mainline; tag is carlton_dictionary-20030805-merge.
Diffstat (limited to 'gdb/cli/cli-interp.c')
-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;
}