mirror of
https://github.com/intel/llvm.git
synced 2026-02-03 10:39:35 +08:00
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
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
%}
|
||||
Reference in New Issue
Block a user