aboutsummaryrefslogtreecommitdiff
path: root/gdb/exceptions.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/exceptions.c')
-rw-r--r--gdb/exceptions.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gdb/exceptions.c b/gdb/exceptions.c
index 0e60050..9a10f66 100644
--- a/gdb/exceptions.c
+++ b/gdb/exceptions.c
@@ -26,10 +26,12 @@
#include "ui-out.h"
#include "serial.h"
#include "gdbthread.h"
+#include "top.h"
static void
print_flush (void)
{
+ struct ui *ui = current_ui;
struct serial *gdb_stdout_serial;
struct cleanup *old_chain = make_cleanup (null_cleanup, NULL);
@@ -56,7 +58,7 @@ print_flush (void)
gdb_flush (gdb_stderr);
/* 3. The system-level buffer. */
- gdb_stdout_serial = serial_fdopen (1);
+ gdb_stdout_serial = serial_fdopen (fileno (ui->outstream));
if (gdb_stdout_serial)
{
serial_drain_output (gdb_stdout_serial);