gdb_rust_pretty_printing: adapt to the changes in the layout of btree::LeafNode
This commit is contained in:
parent
6644e18e30
commit
4d8310cef2
@ -322,8 +322,10 @@ class RustStdBTreeSetPrinter(object):
|
||||
def children(self):
|
||||
(length, data_ptr) = \
|
||||
rustpp.extract_length_and_ptr_from_std_btreeset(self.__val)
|
||||
val = GdbValue(data_ptr.get_wrapped_value().dereference()).get_child_at_index(3)
|
||||
gdb_ptr = val.get_wrapped_value()
|
||||
maybe_uninit_keys = GdbValue(data_ptr.get_wrapped_value().dereference()).get_child_at_index(3)
|
||||
manually_drop_keys = maybe_uninit_keys.get_child_at_index(1)
|
||||
keys = manually_drop_keys.get_child_at_index(0)
|
||||
gdb_ptr = keys.get_wrapped_value()
|
||||
for index in xrange(length):
|
||||
yield (str(index), gdb_ptr[index])
|
||||
|
||||
@ -345,9 +347,13 @@ class RustStdBTreeMapPrinter(object):
|
||||
def children(self):
|
||||
(length, data_ptr) = \
|
||||
rustpp.extract_length_and_ptr_from_std_btreemap(self.__val)
|
||||
keys = GdbValue(data_ptr.get_wrapped_value().dereference()).get_child_at_index(3)
|
||||
maybe_uninit_keys = GdbValue(data_ptr.get_wrapped_value().dereference()).get_child_at_index(3)
|
||||
manually_drop_keys = maybe_uninit_keys.get_child_at_index(1)
|
||||
keys = manually_drop_keys.get_child_at_index(0)
|
||||
keys_ptr = keys.get_wrapped_value()
|
||||
vals = GdbValue(data_ptr.get_wrapped_value().dereference()).get_child_at_index(4)
|
||||
maybe_uninit_vals = GdbValue(data_ptr.get_wrapped_value().dereference()).get_child_at_index(4)
|
||||
manually_drop_vals = maybe_uninit_vals.get_child_at_index(1)
|
||||
vals = manually_drop_vals.get_child_at_index(0)
|
||||
vals_ptr = vals.get_wrapped_value()
|
||||
for index in xrange(length):
|
||||
yield (str(index), keys_ptr[index])
|
||||
|
Loading…
x
Reference in New Issue
Block a user