Make `CStruct2GDB` support `gdb.types.has_field()`

pull/1226/head
lebr0nli 3 years ago committed by Disconnect3d
parent 32166d0ed3
commit 0237c1deff

@ -101,6 +101,7 @@ class FakeGDBField:
class CStruct2GDB: class CStruct2GDB:
code = gdb.TYPE_CODE_STRUCT
_c_struct = None _c_struct = None
def __init__(self, address: int) -> None: def __init__(self, address: int) -> None:
@ -155,6 +156,13 @@ class CStruct2GDB:
""" """
return type(self) return type(self)
@classmethod
def unqualified(cls):
"""
Returns cls to make it compatible with the `gdb.types.has_field()` interface.
"""
return cls
@classmethod @classmethod
def fields(cls): def fields(cls):
""" """

Loading…
Cancel
Save