124eb5d31baca17123c50582fec223bc2b61bb76
[openbsd] /
1 import lldb
2
3
4 class fooSynthProvider:
5
6     def __init__(self, valobj, dict):
7         self.valobj = valobj
8         self.int_type = valobj.GetType().GetBasicType(lldb.eBasicTypeInt)
9
10     def num_children(self):
11         return 3
12
13     def get_child_at_index(self, index):
14         if index == 0:
15             child = self.valobj.GetChildMemberWithName('a')
16         if index == 1:
17             child = self.valobj.CreateChildAtOffset('fake_a', 1, self.int_type)
18         if index == 2:
19             child = self.valobj.GetChildMemberWithName('r')
20         return child
21
22     def get_child_index(self, name):
23         if name == 'a':
24             return 0
25         if name == 'fake_a':
26             return 1
27         return 2