Flush the prompts immediately in the breakpoint command input readers, to make 
sure they come out at the correct times.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@117470 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Interpreter/ScriptInterpreterPython.cpp b/source/Interpreter/ScriptInterpreterPython.cpp
index 7bb94ca..906cb74 100644
--- a/source/Interpreter/ScriptInterpreterPython.cpp
+++ b/source/Interpreter/ScriptInterpreterPython.cpp
@@ -638,6 +638,7 @@
                 ::fprintf (out_fh, "%s\n", g_reader_instructions);
                 if (reader.GetPrompt())
                     ::fprintf (out_fh, "%s", reader.GetPrompt());
+                ::fflush (out_fh);
             }
         }
         break;
@@ -647,7 +648,10 @@
 
     case eInputReaderReactivate:
         if (reader.GetPrompt() && out_fh)
+        {
             ::fprintf (out_fh, "%s", reader.GetPrompt());
+            ::fflush (out_fh);
+        }
         break;
 
     case eInputReaderGotToken:
@@ -655,7 +659,10 @@
             std::string temp_string (bytes, bytes_len);
             commands_in_progress.AppendString (temp_string.c_str());
             if (out_fh && !reader.IsDone() && reader.GetPrompt())
+            {
                 ::fprintf (out_fh, "%s", reader.GetPrompt());
+                ::fflush (out_fh);
+            }
         }
         break;