summaryrefslogtreecommitdiffstats
path: root/lldb/scripts/Python/python-extensions.swig
diff options
context:
space:
mode:
authorEnrico Granata <egranata@apple.com>2014-10-08 20:10:09 +0000
committerEnrico Granata <egranata@apple.com>2014-10-08 20:10:09 +0000
commit8387e2fafebf78e4840e18be3d75ea7b9432faaa (patch)
tree4edf2e3e072a9e1aa619dc7e46cd79d48d6092b2 /lldb/scripts/Python/python-extensions.swig
parentf9e872156433419c21219087f627099830024b55 (diff)
downloadbcm5719-llvm-8387e2fafebf78e4840e18be3d75ea7b9432faaa.tar.gz
bcm5719-llvm-8387e2fafebf78e4840e18be3d75ea7b9432faaa.zip
Add a (Python only) lldb.SBSyntheticValueProvider class to our API surface
On a suggestion from Jim Ingham, this class allows you to very easily define synthetic child providers that return a synthetic value (in the sense of r219330), but no children Also, document this new feature in our www docs llvm-svn: 219337
Diffstat (limited to 'lldb/scripts/Python/python-extensions.swig')
-rw-r--r--lldb/scripts/Python/python-extensions.swig24
1 files changed, 24 insertions, 0 deletions
diff --git a/lldb/scripts/Python/python-extensions.swig b/lldb/scripts/Python/python-extensions.swig
index 9e9feb8a3c7..a1d98dea3b2 100644
--- a/lldb/scripts/Python/python-extensions.swig
+++ b/lldb/scripts/Python/python-extensions.swig
@@ -1047,3 +1047,27 @@ class value(object):
def __neq__(self, other):
return not self.__eq__(other)
%}
+
+%pythoncode %{
+
+class SBSyntheticValueProvider(object):
+ def __init__(self,valobj):
+ pass
+
+ def num_children(self):
+ return 0
+
+ def get_child_index(self,name):
+ return None
+
+ def get_child_at_index(self,idx):
+ return None
+
+ def update(self):
+ pass
+
+ def has_children(self):
+ return False
+
+
+%} \ No newline at end of file
OpenPOWER on IntegriCloud