diff --git a/libcxx/utils/gdb/libcxx/printers.py b/libcxx/utils/gdb/libcxx/printers.py index 2762091835d0c..3f13b1f693c54 100644 --- a/libcxx/utils/gdb/libcxx/printers.py +++ b/libcxx/utils/gdb/libcxx/printers.py @@ -147,6 +147,8 @@ def __next__(self): self.count += 1 return ("[%d]" % self.count, child) + next = __next__ # Needed for GDB built against Python 2.7. + def __init__(self, val): self.val = val @@ -356,6 +358,8 @@ def __next__(self): self.offset = 0 return ("[%d]" % self.count, outbit) + next = __next__ # Needed for GDB built against Python 2.7. + class _VectorIterator(object): """Class to iterate over the non-bool vector's children.""" @@ -375,6 +379,8 @@ def __next__(self): self.item += 1 return ("[%d]" % self.count, entry) + next = __next__ # Needed for GDB built against Python 2.7. + def __init__(self, val): """Set val, length, capacity, and iterator for bool and normal vectors.""" self.val = val