[Lldb-commits] [lldb] r127452 - in /lldb/trunk: include/lldb/Interpreter/CommandInterpreter.h source/Interpreter/CommandInterpreter.cpp

Jim Ingham jingham at apple.com
Thu Mar 10 17:51:49 PST 2011


Author: jingham
Date: Thu Mar 10 19:51:49 2011
New Revision: 127452

URL: http://llvm.org/viewvc/llvm-project?rev=127452&view=rev
Log:
CommandInterpreter::HandleCommands should take its commands as a "const StringList &" since it doesn't modify it...

Also, don't turn on the immediate output in the temporary result, or you'll get doubled output.

Modified:
    lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h
    lldb/trunk/source/Interpreter/CommandInterpreter.cpp

Modified: lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h?rev=127452&r1=127451&r2=127452&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h (original)
+++ lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h Thu Mar 10 19:51:49 2011
@@ -120,7 +120,7 @@
     ///    and failed with some explanation if we aborted executing the commands at some point.
     //------------------------------------------------------------------
     void
-    HandleCommands (StringList &commands, 
+    HandleCommands (const StringList &commands, 
                     ExecutionContext *context, 
                     bool stop_on_continue, 
                     bool stop_on_error, 

Modified: lldb/trunk/source/Interpreter/CommandInterpreter.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/CommandInterpreter.cpp?rev=127452&r1=127451&r2=127452&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/CommandInterpreter.cpp (original)
+++ lldb/trunk/source/Interpreter/CommandInterpreter.cpp Thu Mar 10 19:51:49 2011
@@ -1508,7 +1508,7 @@
 }
 
 void
-CommandInterpreter::HandleCommands (StringList &commands, 
+CommandInterpreter::HandleCommands (const StringList &commands, 
                                     ExecutionContext *override_context, 
                                     bool stop_on_continue,
                                     bool stop_on_error,
@@ -1548,8 +1548,6 @@
         }
 
         CommandReturnObject tmp_result;
-        tmp_result.SetImmediateOutputStream (result.GetImmediateOutputStream ());
-        tmp_result.SetImmediateErrorStream (result.GetImmediateErrorStream ());
         bool success = HandleCommand(cmd, false, tmp_result, NULL);
         
         if (print_results)





More information about the lldb-commits mailing list