fixup debugger files wrt to MaybeDangling

- fixup `BTreeMap` gdb provider
- fixup `ManuallyDrop` natvis thingy

Now that `MaybeUninit` contains `ManuallyDrop` which contains
`MaybeDangling` (tbc this is the addition), we need to unwrap one more
layer.
This commit is contained in:
Waffle Lapkin 2025-12-07 18:04:13 +01:00
parent 722e3102a2
commit d42f7ea7ca
No known key found for this signature in database
2 changed files with 5 additions and 5 deletions

View file

@ -298,7 +298,7 @@ def children_of_btree_map(map):
for i in xrange(0, length + 1):
if height > 0:
child_ptr = edges[i]["value"]["value"]
child_ptr = edges[i]["value"]["value"][ZERO_FIELD]
for child in children_of_node(child_ptr, height - 1):
yield child
if i < length:
@ -306,12 +306,12 @@ def children_of_btree_map(map):
key_type_size = keys.type.sizeof
val_type_size = vals.type.sizeof
key = (
keys[i]["value"]["value"]
keys[i]["value"]["value"][ZERO_FIELD]
if key_type_size > 0
else gdb.parse_and_eval("()")
)
val = (
vals[i]["value"]["value"]
vals[i]["value"]["value"][ZERO_FIELD]
if val_type_size > 0
else gdb.parse_and_eval("()")
)

View file

@ -35,9 +35,9 @@
</Type>
<Type Name="core::mem::manually_drop::ManuallyDrop&lt;*&gt;">
<DisplayString>{value}</DisplayString>
<DisplayString>{value.__0}</DisplayString>
<Expand>
<ExpandedItem>value</ExpandedItem>
<ExpandedItem>value.__0</ExpandedItem>
</Expand>
</Type>