[Lldb-commits] [lldb] r154502 - /lldb/trunk/scripts/Python/interface/SBValue.i

Greg Clayton gclayton at apple.com
Wed Apr 11 09:20:15 PDT 2012


Author: gclayton
Date: Wed Apr 11 11:20:15 2012
New Revision: 154502

URL: http://llvm.org/viewvc/llvm-project?rev=154502&view=rev
Log:
Added a property to get the dynamic type which uses the most permissive way to get a dynamic type.


Modified:
    lldb/trunk/scripts/Python/interface/SBValue.i

Modified: lldb/trunk/scripts/Python/interface/SBValue.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Python/interface/SBValue.i?rev=154502&r1=154501&r2=154502&view=diff
==============================================================================
--- lldb/trunk/scripts/Python/interface/SBValue.i (original)
+++ lldb/trunk/scripts/Python/interface/SBValue.i Wed Apr 11 11:20:15 2012
@@ -379,7 +379,10 @@
     GetExpressionPath (lldb::SBStream &description, bool qualify_cxx_base_classes);
     
     %pythoncode %{
-
+        def __get_dynamic__ (self):
+            '''Helper function for the "SBValue.dynamic" property.'''
+            return self.GetDynamicValue (eDynamicCanRunTarget)
+        
         __swig_getmethods__["name"] = GetName
         if _newclass: name = property(GetName, None, doc='Returns the name of this SBValue as a string')
 
@@ -429,7 +432,10 @@
 
         __swig_getmethods__["description"] = GetObjectDescription
         if _newclass: description = property(GetObjectDescription, None, doc='Returns the language-specific description of this SBValue as a string')
-
+        
+        __swig_getmethods__["dynamic"] = __get_dynamic__
+        if _newclass: description = property(__get_dynamic__, None, doc='Gets the dynamic type for a value')
+        
         __swig_getmethods__["location"] = GetLocation
         if _newclass: location = property(GetLocation, None, doc='Returns the location of this SBValue as a string')
 





More information about the lldb-commits mailing list