OSDN Git Service

* interp.c (sim_monitor): Flush stdout and stderr file descriptors
authorths <ths>
Mon, 19 Feb 2007 17:46:53 +0000 (17:46 +0000)
committerths <ths>
Mon, 19 Feb 2007 17:46:53 +0000 (17:46 +0000)
after each call to sim_io_write.

sim/mips/ChangeLog
sim/mips/interp.c

index 632ae32..9ff5dbb 100644 (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>
        
index 13cd26e..51ad1de 100644 (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;
       }