about summary refs log tree commit diff
path: root/src/etc
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2019-01-28 17:33:29 +0100
committerRalf Jung <post@ralfj.de>2019-01-28 17:33:29 +0100
commit489a79247ddf5da8090019ff4da4b688ad55afa7 (patch)
treec0339c52e400cd9278eba1e0ea4d7b9663ea20b0 /src/etc
parent6a52ca3fb465544f62cee70bec9499b967939cc9 (diff)
downloadrust-489a79247ddf5da8090019ff4da4b688ad55afa7.tar.gz
rust-489a79247ddf5da8090019ff4da4b688ad55afa7.zip
fix gdb debug printing
Diffstat (limited to 'src/etc')
-rwxr-xr-xsrc/etc/gdb_rust_pretty_printing.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/etc/gdb_rust_pretty_printing.py b/src/etc/gdb_rust_pretty_printing.py
index b9413563fd9..a6b09722e1c 100755
--- a/src/etc/gdb_rust_pretty_printing.py
+++ b/src/etc/gdb_rust_pretty_printing.py
@@ -330,19 +330,20 @@ def children_of_node(boxed_node, height, want_values):
         leaf = node_ptr['data']
     else:
         leaf = node_ptr.dereference()
-    keys = leaf['keys']['value']['value']
+    keys = leaf['keys']
     if want_values:
-        values = leaf['vals']['value']['value']
+        values = leaf['vals']
     length = int(leaf['len'])
     for i in xrange(0, length + 1):
         if height > 0:
-            for child in children_of_node(node_ptr['edges'][i], height - 1, want_values):
+            child_ptr = node_ptr['edges'][i]['value']['value']
+            for child in children_of_node(child_ptr, height - 1, want_values):
                 yield child
         if i < length:
             if want_values:
-                yield (keys[i], values[i])
+                yield (keys[i]['value']['value'], values[i]['value']['value'])
             else:
-                yield keys[i]
+                yield keys[i]['value']['value']
 
 class RustStdBTreeSetPrinter(object):
     def __init__(self, val):