aboutsummaryrefslogtreecommitdiff
path: root/sim
diff options
context:
space:
mode:
authorThiemo Seufer <ths@networkno.de>2007-02-19 17:46:53 +0000
committerThiemo Seufer <ths@networkno.de>2007-02-19 17:46:53 +0000
commitf8df4c7704d349e0622d471b2e0d2bfb86cd5b2f (patch)
treeaf4d5cc686e52c5dd7243dd47bdbfd93f03d43e8 /sim
parent929e4d1a15b37f533a324b5786ea82177dc1d1d7 (diff)
downloadgdb-f8df4c7704d349e0622d471b2e0d2bfb86cd5b2f.zip
gdb-f8df4c7704d349e0622d471b2e0d2bfb86cd5b2f.tar.gz
gdb-f8df4c7704d349e0622d471b2e0d2bfb86cd5b2f.tar.bz2
* interp.c (sim_monitor): Flush stdout and stderr file descriptors
after each call to sim_io_write.
Diffstat (limited to 'sim')
-rw-r--r--sim/mips/ChangeLog6
-rw-r--r--sim/mips/interp.c4
2 files changed, 10 insertions, 0 deletions
diff --git a/sim/mips/ChangeLog b/sim/mips/ChangeLog
index 632ae32..9ff5dbb 100644
--- a/sim/mips/ChangeLog
+++ b/sim/mips/ChangeLog
@@ -1,3 +1,9 @@
+2007-02-19 Thiemo Seufer <ths@mips.com>
+ Nigel Stephens <nigel@mips.com>
+
+ * interp.c (sim_monitor): Flush stdout and stderr file descriptors
+ after each call to sim_io_write.
+
2007-02-19 Thiemo Seufer <ths@mips.com>
Nigel Stephens <nigel@mips.com>
diff --git a/sim/mips/interp.c b/sim/mips/interp.c
index 13cd26e..51ad1de 100644
--- a/sim/mips/interp.c
+++ b/sim/mips/interp.c
@@ -1264,6 +1264,10 @@ sim_monitor (SIM_DESC sd,
char *buf = zalloc (nr);
sim_read (sd, A1, buf, nr);
V0 = sim_io_write (sd, fd, buf, nr);
+ if (fd == 1)
+ sim_io_flush_stdout (sd);
+ else if (fd == 2)
+ sim_io_flush_stderr (sd);
zfree (buf);
break;
}