diff options
Diffstat (limited to 'tools/gdb/python/objects.py')
-rw-r--r-- | tools/gdb/python/objects.py | 51 |
1 files changed, 1 insertions, 50 deletions
diff --git a/tools/gdb/python/objects.py b/tools/gdb/python/objects.py index d2ba216..23ea7be 100644 --- a/tools/gdb/python/objects.py +++ b/tools/gdb/python/objects.py @@ -245,53 +245,4 @@ class control: def name(self): is_string = information.is_string(self._id.api(), self._id._class()) - return str(name(self.object['name'], is_string)) - - - - -class control_printer: - - class iterator: - """Use an iterator for each field expanded from the id so GDB output - is formatted correctly.""" - - def __init__(self, object): - self.object = object - self.count = 0 - - def __iter__(self): - return self - - def next(self): - self.count += 1 - if self.count == 1: - return self.object.node() - elif self.count == 2: - return self.object.id() - elif self.count == 3: - return self.object.name() - raise StopIteration - - def to_string(self): - return '' - - def __init__(self, object): - self.object = control(object) - - @staticmethod - def key(i): - if i == 0: - return 'Node' - elif i == 1: - return 'id' - elif i == 2: - return 'name' - return 'bad' - - def children(self): - counter = itertools.imap (self.key, itertools.count()) - return itertools.izip (counter, self.iterator(self.object)) - - def display_hint (self): - return 'struct' + return str(name(self.object['name'], is_string))
\ No newline at end of file |