* interp.c (sim_monitor): Flush stdout and stderr file descriptors

after each call to sim_io_write.
This commit is contained in:
Thiemo Seufer 2007-02-19 17:46:53 +00:00
parent 929e4d1a15
commit f8df4c7704
2 changed files with 10 additions and 0 deletions

View File

@ -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>

View File

@ -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;
}