• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1import lldb
2class fooSynthProvider:
3     def __init__(self, valobj, dict):
4         self.valobj = valobj;
5         self.int_type = valobj.GetType().GetBasicType(lldb.eBasicTypeInt)
6     def num_children(self):
7         return 3;
8     def get_child_at_index(self, index):
9         if index == 0:
10             child = self.valobj.GetChildMemberWithName('a');
11         if index == 1:
12             child = self.valobj.CreateChildAtOffset ('fake_a', 1, self.int_type);
13         if index == 2:
14             child = self.valobj.GetChildMemberWithName('r');
15         return child;
16     def get_child_index(self, name):
17         if name == 'a':
18             return 0;
19         if name == 'fake_a':
20             return 1;
21    	 return 2;
22