Skip to content

Commit 489a792

Browse files
committed
fix gdb debug printing
1 parent 6a52ca3 commit 489a792

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/etc/gdb_rust_pretty_printing.py

+6-5
Original file line numberDiff line numberDiff line change
@@ -330,19 +330,20 @@ def children_of_node(boxed_node, height, want_values):
330330
leaf = node_ptr['data']
331331
else:
332332
leaf = node_ptr.dereference()
333-
keys = leaf['keys']['value']['value']
333+
keys = leaf['keys']
334334
if want_values:
335-
values = leaf['vals']['value']['value']
335+
values = leaf['vals']
336336
length = int(leaf['len'])
337337
for i in xrange(0, length + 1):
338338
if height > 0:
339-
for child in children_of_node(node_ptr['edges'][i], height - 1, want_values):
339+
child_ptr = node_ptr['edges'][i]['value']['value']
340+
for child in children_of_node(child_ptr, height - 1, want_values):
340341
yield child
341342
if i < length:
342343
if want_values:
343-
yield (keys[i], values[i])
344+
yield (keys[i]['value']['value'], values[i]['value']['value'])
344345
else:
345-
yield keys[i]
346+
yield keys[i]['value']['value']
346347

347348
class RustStdBTreeSetPrinter(object):
348349
def __init__(self, val):

0 commit comments

Comments
 (0)