Add properties to SBExecutionContext to access the several entities it stores in...
authorEnrico Granata <egranata@apple.com>
Tue, 21 Apr 2015 22:09:12 +0000 (22:09 +0000)
committerEnrico Granata <egranata@apple.com>
Tue, 21 Apr 2015 22:09:12 +0000 (22:09 +0000)
llvm-svn: 235447

lldb/scripts/Python/interface/SBExecutionContext.i

index d138398..cd9d928 100644 (file)
@@ -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