[Lldb-commits] [lldb] r215244 - Add an option to suppress the persistent result variable when running EvaluateExpression

Jim Ingham jingham at apple.com
Fri Aug 8 14:45:37 PDT 2014


Author: jingham
Date: Fri Aug  8 16:45:36 2014
New Revision: 215244

URL: http://llvm.org/viewvc/llvm-project?rev=215244&view=rev
Log:
Add an option to suppress the persistent result variable when running EvaluateExpression
from Python.  If you don't need to refer to the result in another expression, there's no
need to bloat the persistent variable table with them since you already have the result
SBValue to work with.

<rdar://problem/17963645>

Modified:
    lldb/trunk/include/lldb/API/SBExpressionOptions.h
    lldb/trunk/scripts/Python/interface/SBExpressionOptions.i
    lldb/trunk/source/API/SBExpressionOptions.cpp

Modified: lldb/trunk/include/lldb/API/SBExpressionOptions.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBExpressionOptions.h?rev=215244&r1=215243&r2=215244&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBExpressionOptions.h (original)
+++ lldb/trunk/include/lldb/API/SBExpressionOptions.h Fri Aug  8 16:45:36 2014
@@ -98,6 +98,12 @@ public:
     
     void
     SetGenerateDebugInfo (bool b = true);
+    
+    bool
+    GetSuppressPersistentResult ();
+    
+    void
+    SetSuppressPersistentResult (bool b = false);
 
 protected:
 

Modified: lldb/trunk/scripts/Python/interface/SBExpressionOptions.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Python/interface/SBExpressionOptions.i?rev=215244&r1=215243&r2=215244&view=diff
==============================================================================
--- lldb/trunk/scripts/Python/interface/SBExpressionOptions.i (original)
+++ lldb/trunk/scripts/Python/interface/SBExpressionOptions.i Fri Aug  8 16:45:36 2014
@@ -102,6 +102,15 @@ public:
     %feature("docstring", "Sets whether to generate debug information for the expression and also controls if a SBModule is generated.") SetGenerateDebugInfo;
     void
     SetGenerateDebugInfo (bool b = true);
+    
+    bool
+    GetSuppressPersistentResult ();
+    
+    %feature("docstring", "Sets whether to produce a persistent result that can be used in future expressions.") SetSuppressPersistentResult;
+    void
+    SetSuppressPersistentResult (bool b = false);
+
+
 
 protected:
 

Modified: lldb/trunk/source/API/SBExpressionOptions.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBExpressionOptions.cpp?rev=215244&r1=215243&r2=215244&view=diff
==============================================================================
--- lldb/trunk/source/API/SBExpressionOptions.cpp (original)
+++ lldb/trunk/source/API/SBExpressionOptions.cpp Fri Aug  8 16:45:36 2014
@@ -173,6 +173,19 @@ SBExpressionOptions::SetGenerateDebugInf
     return m_opaque_ap->SetGenerateDebugInfo(b);
 }
 
+bool
+SBExpressionOptions::GetSuppressPersistentResult ()
+{
+    return m_opaque_ap->GetResultIsInternal ();
+}
+
+void
+SBExpressionOptions::SetSuppressPersistentResult (bool b)
+{
+    return m_opaque_ap->SetResultIsInternal (b);
+}
+
+
 EvaluateExpressionOptions *
 SBExpressionOptions::get() const
 {





More information about the lldb-commits mailing list