Log:<br><br>~/vis/test:$ gsi test.scm<br>"~\"GNU gdb 6.8-debian\\n\""<br>"~\"Copyright (C) 2008 Free Software Foundation, Inc.\\n\""<br>"~\"License GPLv3+: GNU GPL version 3 or later <<a href="http://gnu.org/licenses/gpl.html">http://gnu.org/licenses/gpl.html</a>>\\n\""<br>
"~\"This is free software: you are free to change and redistribute it.\\n\""<br>"~\"There is NO WARRANTY, to the extent permitted by law.  Type \\\"show copying\\\"\\n\""<br>
"~\"and \\\"show warranty\\\" for details.\\n\""<br>"~\"This GDB was configured as \\\"x86_64-linux-gnu\\\".\\n\""<br>"(gdb) "<br>~/vis/test:$ gsi test.scm<br>
~/vis/test:$ gsi test.scm<br>~/vis/test:$ gsi test.scm<br>"~\"GNU gdb 6.8-debian\\n\""<br>"~\"Copyright (C) 2008 Free Software Foundation, Inc.\\n\""<br>"~\"License GPLv3+: GNU GPL version 3 or later <<a href="http://gnu.org/licenses/gpl.html">http://gnu.org/licenses/gpl.html</a>>\\n\""<br>
"~\"This is free software: you are free to change and redistribute it.\\n\""<br>"~\"There is NO WARRANTY, to the extent permitted by law.  Type \\\"show copying\\\"\\n\""<br>
"~\"and \\\"show warranty\\\" for details.\\n\""<br>"~\"This GDB was configured as \\\"x86_64-linux-gnu\\\".\\n\""<br>"(gdb) "<br>~/vis/test:$ gsi test.scm<br>
"~\"GNU gdb 6.8-debian\\n\""<br>"~\"Copyright (C) 2008 Free Software Foundation, Inc.\\n\""<br>"~\"License GPLv3+: GNU GPL version 3 or later <<a href="http://gnu.org/licenses/gpl.html">http://gnu.org/licenses/gpl.html</a>>\\n\""<br>
"~\"This is free software: you are free to change and redistribute it.\\n\""<br>"~\"There is NO WARRANTY, to the extent permitted by law.  Type \\\"show copying\\\"\\n\""<br>
"~\"and \\\"show warranty\\\" for details.\\n\""<br>"~\"This GDB was configured as \\\"x86_64-linux-gnu\\\".\\n\""<br>"(gdb) "<br>~/vis/test:$ gsi test.scm<br>
~/vis/test:$ <br><br><br>Code:<br><br>~/vis/test:$ cat test.scm<br>(define p (open-process (list path: "gdb"<br>                              arguments: '("--interpreter=mi2"))))<br>(define (rr)<br>
  (if (char-ready? p) (pp (read-line p))))<br><br>(rr) (rr) (rr) (rr) (rr) (rr) (rr) (rr) (rr) (rr)<br>(rr) (rr) (rr) (rr) (rr) (rr) (rr) (rr) (rr) (rr)<br><br><br>Questions:<br><br>1) Why is this non-deterministic? (subject to how fast gdb prints out its data?)<br>
<br>2) How can I make it deterministic? (I'd prefer something better than "sleep for 0.5 seconds")<br><br>Thanks!<br>