Skip to content

Conversation

@sdimitro
Copy link
Owner

When capturing objects, the code accessed obj.type_.size directly which fails for typedef types with 'AttributeError: typedef type does not have a size'.

Instead of giving up on these types, use drgn.sizeof(obj.type_) which properly resolves typedefs to get the underlying type's actual size.

This allows capturing variables like zfs_dbgmsgs and spa_namespace_avl that are typedef'd list/avl structures.

When capturing objects, the code accessed obj.type_.size directly which
fails for typedef types with 'AttributeError: typedef type does not have
a size'.

Instead of giving up on these types, use drgn.sizeof(obj.type_) which
properly resolves typedefs to get the underlying type's actual size.

This allows capturing variables like zfs_dbgmsgs and spa_namespace_avl
that are typedef'd list/avl structures.

Signed-off-by: Serapheim Dimitropoulos <sdimitropoulos@coreweave.com>
@sdimitro sdimitro merged commit c70761d into develop Jan 21, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants