gdb: Use helper to get rows from mutation_partition

Preparation for the next patch

Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>
This commit is contained in:
Pavel Emelyanov
2021-03-23 09:24:43 +03:00
parent 742a33730a
commit ed38b18a84

View File

@@ -597,8 +597,11 @@ class mutation_partition_printer(gdb.printing.PrettyPrinter):
def __init__(self, val):
self.val = val
def __rows(self):
return intrusive_set_external_comparator(self.val['_rows'])
def to_string(self):
rows = list(str(r) for r in intrusive_set_external_comparator(self.val['_rows']))
rows = list(str(r) for r in self.__rows())
range_tombstones = list(str(r) for r in intrusive_set(self.val['_row_tombstones']['_tombstones']))
return '{_tombstone=%s, _static_row=%s (cont=%s), _row_tombstones=[%s], _rows=[%s]}' % (
self.val['_tombstone'],