Files
clang-p2996/lldb/test/functionalities/data-formatter/data-formatter-python-synth/fooSynthProvider.py
Enrico Granata c53114e30a new flag -P to type synth add lets you type a Python class interactively
added a final newline to fooSynthProvider.py
new option to automatically save user input in InputReaderEZ
checking for NULL pointers in several new places

llvm-svn: 135916
2011-07-25 16:59:05 +00:00

17 lines
494 B
Python

class fooSynthProvider:
def __init__(self, valobj, dict):
self.valobj = valobj;
def num_children(self):
return 2;
def get_child_at_index(self, index):
if index == 1:
child = self.valobj.GetChildMemberWithName('a');
else:
child = self.valobj.GetChildMemberWithName('r');
return child;
def get_child_index(self, name):
if name == 'a':
return 1;
else:
return 0;