diff --git a/pwndbg/heap/structs.py b/pwndbg/heap/structs.py index a73726dc1..a347b938e 100644 --- a/pwndbg/heap/structs.py +++ b/pwndbg/heap/structs.py @@ -101,6 +101,7 @@ class FakeGDBField: class CStruct2GDB: + code = gdb.TYPE_CODE_STRUCT _c_struct = None def __init__(self, address: int) -> None: @@ -155,6 +156,13 @@ class CStruct2GDB: """ return type(self) + @classmethod + def unqualified(cls): + """ + Returns cls to make it compatible with the `gdb.types.has_field()` interface. + """ + return cls + @classmethod def fields(cls): """