[Lldb-commits] [lldb] r124747 - /lldb/branches/apple/calcite/lldb/source/Interpreter/CommandInterpreter.cpp

Caroline Tice ctice at apple.com
Wed Feb 2 13:05:41 PST 2011


Author: ctice
Date: Wed Feb  2 15:05:41 2011
New Revision: 124747

URL: http://llvm.org/viewvc/llvm-project?rev=124747&view=rev
Log:
Committing r124711 from TOT to calcite branch.

Make sure the confirmation input reader calls fflush after writing its output.
(<rdar://problem/8946573>)


Modified:
    lldb/branches/apple/calcite/lldb/source/Interpreter/CommandInterpreter.cpp

Modified: lldb/branches/apple/calcite/lldb/source/Interpreter/CommandInterpreter.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/apple/calcite/lldb/source/Interpreter/CommandInterpreter.cpp?rev=124747&r1=124746&r2=124747&view=diff
==============================================================================
--- lldb/branches/apple/calcite/lldb/source/Interpreter/CommandInterpreter.cpp (original)
+++ lldb/branches/apple/calcite/lldb/source/Interpreter/CommandInterpreter.cpp Wed Feb  2 15:05:41 2011
@@ -1116,7 +1116,10 @@
         if (out_fh)
         {
             if (reader.GetPrompt())
+            {
                 ::fprintf (out_fh, "%s", reader.GetPrompt());
+                ::fflush (out_fh);
+            }
         }
         break;
 
@@ -1125,7 +1128,10 @@
 
     case eInputReaderReactivate:
         if (out_fh && reader.GetPrompt())
+        {
             ::fprintf (out_fh, "%s", reader.GetPrompt());
+            ::fflush (out_fh);
+        }
         break;
 
     case eInputReaderGotToken:
@@ -1149,6 +1155,7 @@
             {
                 ::fprintf (out_fh, "Please answer \"y\" or \"n\"\n");
                 ::fprintf (out_fh, "%s", reader.GetPrompt());
+                ::fflush (out_fh);
             }
         }
         break;





More information about the lldb-commits mailing list