[Lldb-commits] [lldb] r235447 - Add properties to SBExecutionContext to access the several entities it stores in a more Pythonic fashion

Enrico Granata egranata at apple.com
Tue Apr 21 15:09:12 PDT 2015


Author: enrico
Date: Tue Apr 21 17:09:12 2015
New Revision: 235447

URL: http://llvm.org/viewvc/llvm-project?rev=235447&view=rev
Log:
Add properties to SBExecutionContext to access the several entities it stores in a more Pythonic fashion


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

Modified: lldb/trunk/scripts/Python/interface/SBExecutionContext.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Python/interface/SBExecutionContext.i?rev=235447&r1=235446&r2=235447&view=diff
==============================================================================
--- lldb/trunk/scripts/Python/interface/SBExecutionContext.i (original)
+++ lldb/trunk/scripts/Python/interface/SBExecutionContext.i Tue Apr 21 17:09:12 2015
@@ -37,6 +37,21 @@ public:
     
     SBFrame
     GetFrame () const;
+    
+    %pythoncode %{
+        __swig_getmethods__["target"] = GetTarget
+        if _newclass: target = property(GetTarget, None, doc='''A read only property that returns the same result as GetTarget().''')
+
+        __swig_getmethods__["process"] = GetProcess
+        if _newclass: process = property(GetProcess, None, doc='''A read only property that returns the same result as GetProcess().''')
+
+        __swig_getmethods__["thread"] = GetThread
+        if _newclass: thread = property(GetThread, None, doc='''A read only property that returns the same result as GetThread().''')
+            
+        __swig_getmethods__["frame"] = GetFrame
+        if _newclass: frame = property(GetFrame, None, doc='''A read only property that returns the same result as GetFrame().''')
+    %}
+
 };
     
 } // namespace lldb





More information about the lldb-commits mailing list