• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1import lldb
2
3counter = 0
4
5class ftsp:
6	def __init__(self, valobj, dict):
7		self.valobj = valobj;
8	def num_children(self):
9		if self.char.IsValid():
10			return 5;
11		return 0;
12	def get_child_index(self,name):
13		return 0;
14	def get_child_at_index(self,index):
15		if index == 0:
16			return self.x.Cast(self.char)
17		if index == 4:
18			return self.valobj.CreateValueFromExpression(str(index),'(char)('+str(self.count)+')')
19		return self.x.CreateChildAtOffset(str(index),
20									   index,
21									   self.char);
22	def update(self):
23		self.x = self.valobj.GetChildMemberWithName('x');
24		self.char = self.valobj.GetType().GetBasicType(lldb.eBasicTypeChar)
25		global counter
26		self.count = counter
27		counter = counter + 1
28		return True # important: if we return False here, or fail to return, the test will fail
29
30def __lldb_init_module(debugger, dict):
31	global counter
32	counter = 0