[Lldb-commits] [lldb] r201171 - When a multiline expression produces output, the multi-line help message is printed twice.

Greg Clayton gclayton at apple.com
Tue Feb 11 11:11:12 PST 2014


Author: gclayton
Date: Tue Feb 11 13:11:11 2014
New Revision: 201171

URL: http://llvm.org/viewvc/llvm-project?rev=201171&view=rev
Log:
When a multiline expression produces output, the multi-line help message is printed twice.

<rdar://problem/16031890> 


Modified:
    lldb/trunk/source/Commands/CommandObjectExpression.cpp
    lldb/trunk/source/Commands/CommandObjectExpression.h

Modified: lldb/trunk/source/Commands/CommandObjectExpression.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectExpression.cpp?rev=201171&r1=201170&r2=201171&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectExpression.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectExpression.cpp Tue Feb 11 13:11:11 2014
@@ -365,18 +365,6 @@ CommandObjectExpression::EvaluateExpress
 }
 
 void
-CommandObjectExpression::IOHandlerActivated (IOHandler &io_handler)
-{
-    StreamFileSP output_sp(io_handler.GetOutputStreamFile());
-    if (output_sp)
-    {
-        output_sp->PutCString("Enter expressions, then terminate with an empty line to evaluate:\n");
-        output_sp->Flush();
-    }
-}
-
-
-void
 CommandObjectExpression::IOHandlerInputComplete (IOHandler &io_handler, std::string &line)
 {
     io_handler.SetIsDone(true);
@@ -441,6 +429,13 @@ CommandObjectExpression::DoExecute
                                                           NULL,             // No prompt
                                                           multiple_lines,
                                                           *this));
+        
+        StreamFileSP output_sp(io_handler_sp->GetOutputStreamFile());
+        if (output_sp)
+        {
+            output_sp->PutCString("Enter expressions, then terminate with an empty line to evaluate:\n");
+            output_sp->Flush();
+        }
         debugger.PushIOHandler(io_handler_sp);
         return result.Succeeded();
     }

Modified: lldb/trunk/source/Commands/CommandObjectExpression.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectExpression.h?rev=201171&r1=201170&r2=201171&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectExpression.h (original)
+++ lldb/trunk/source/Commands/CommandObjectExpression.h Tue Feb 11 13:11:11 2014
@@ -79,9 +79,6 @@ protected:
     // IOHandler::Delegate functions
     //------------------------------------------------------------------
     virtual void
-    IOHandlerActivated (IOHandler &io_handler);
-
-    virtual void
     IOHandlerInputComplete (IOHandler &io_handler,
                             std::string &line);
 





More information about the lldb-commits mailing list