Skip to content

Commit 6f0e667

Browse files
committed
look through nonnull pointer typedef
1 parent 5d6f0d4 commit 6f0e667

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/etc/gdb_providers.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ def unwrap_unique_or_non_null(unique_or_nonnull):
1515
# BACKCOMPAT: rust 1.60
1616
# https://github.com/rust-lang/rust/commit/2a91eeac1a2d27dd3de1bf55515d765da20fd86f
1717
ptr = unique_or_nonnull["pointer"]
18+
if ptr.type.code == gdb.TYPE_CODE_TYPEDEF:
19+
ptr = ptr.cast(ptr.type.strip_typedefs())
20+
1821
return ptr if ptr.type.code == gdb.TYPE_CODE_PTR else ptr[ptr.type.fields()[0]]
1922

2023

0 commit comments

Comments
 (0)