aboutsummaryrefslogtreecommitdiff
path: root/gdb/mi/mi-interp.c
diff options
context:
space:
mode:
authorStan Shebs <shebs@codesourcery.com>2012-06-06 06:04:46 +0000
committerStan Shebs <shebs@codesourcery.com>2012-06-06 06:04:46 +0000
commitbf6309af8638be5eaef213e63a097327427526a8 (patch)
tree146b59662944c5a81e4a1c3ac4dcee64e0aa30d6 /gdb/mi/mi-interp.c
parent479dd5e6fa717d72f315a3dc3c4021ffdb90f959 (diff)
downloadgdb-bf6309af8638be5eaef213e63a097327427526a8.zip
gdb-bf6309af8638be5eaef213e63a097327427526a8.tar.gz
gdb-bf6309af8638be5eaef213e63a097327427526a8.tar.bz2
* mi/mi-interp.c (mi_interpreter_init): Set raw_stdout from
gdb_stdout.
Diffstat (limited to 'gdb/mi/mi-interp.c')
-rw-r--r--gdb/mi/mi-interp.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/gdb/mi/mi-interp.c b/gdb/mi/mi-interp.c
index daae480..ac0af70 100644
--- a/gdb/mi/mi-interp.c
+++ b/gdb/mi/mi-interp.c
@@ -81,13 +81,12 @@ mi_interpreter_init (struct interp *interp, int top_level)
const char *name;
int mi_version;
- /* HACK: We need to force stdout/stderr to point at the console.
- This avoids any potential side effects caused by legacy code that
- is still using the TUI / fputs_unfiltered_hook. So we set up
- output channels for this now, and swap them in when we are
- run. */
+ /* Assign the output channel created at startup to its own global,
+ so that we can create a console channel that encapsulates and
+ prefixes all gdb_output-type bits coming from the rest of the
+ debugger. */
- raw_stdout = stdio_fileopen (stdout);
+ raw_stdout = gdb_stdout;
/* Create MI console channels, each with a different prefix so they
can be distinguished. */