[Lldb-commits] [lldb] r117470 - in /lldb/trunk/source: Commands/CommandObjectBreakpointCommand.cpp Interpreter/ScriptInterpreterPython.cpp

Caroline Tice ctice at apple.com
Wed Oct 27 11:34:43 PDT 2010


Author: ctice
Date: Wed Oct 27 13:34:42 2010
New Revision: 117470

URL: http://llvm.org/viewvc/llvm-project?rev=117470&view=rev
Log:
Flush the prompts immediately in the breakpoint command input readers, to make 
sure they come out at the correct times.


Modified:
    lldb/trunk/source/Commands/CommandObjectBreakpointCommand.cpp
    lldb/trunk/source/Interpreter/ScriptInterpreterPython.cpp

Modified: lldb/trunk/source/Commands/CommandObjectBreakpointCommand.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectBreakpointCommand.cpp?rev=117470&r1=117469&r2=117470&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectBreakpointCommand.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectBreakpointCommand.cpp Wed Oct 27 13:34:42 2010
@@ -435,6 +435,7 @@
             ::fprintf (out_fh, "%s\n", g_reader_instructions);
             if (reader.GetPrompt())
                 ::fprintf (out_fh, "%s", reader.GetPrompt());
+            ::fflush (out_fh);
         }
         break;
 
@@ -443,7 +444,10 @@
 
     case eInputReaderReactivate:
         if (out_fh && reader.GetPrompt())
+        {
             ::fprintf (out_fh, "%s", reader.GetPrompt());
+            ::fflush (out_fh);
+        }
         break;
 
     case eInputReaderGotToken:
@@ -458,7 +462,10 @@
             }
         }
         if (out_fh && !reader.IsDone() && reader.GetPrompt())
+        {
             ::fprintf (out_fh, "%s", reader.GetPrompt());
+            ::fflush (out_fh);
+        }
         break;
         
     case eInputReaderDone:

Modified: lldb/trunk/source/Interpreter/ScriptInterpreterPython.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/ScriptInterpreterPython.cpp?rev=117470&r1=117469&r2=117470&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/ScriptInterpreterPython.cpp (original)
+++ lldb/trunk/source/Interpreter/ScriptInterpreterPython.cpp Wed Oct 27 13:34:42 2010
@@ -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;
 





More information about the lldb-commits mailing list