X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/92f6e64a6da763c45ff9f4ab5eafcab3d8766dcb..b60166b327a9108b07e3069fa6568a451529ffd9:/lunaix-os/scripts/gdb/lunadbg/structs/__init__.py?ds=sidebyside diff --git a/lunaix-os/scripts/gdb/lunadbg/structs/__init__.py b/lunaix-os/scripts/gdb/lunadbg/structs/__init__.py new file mode 100644 index 0000000..8aa237d --- /dev/null +++ b/lunaix-os/scripts/gdb/lunadbg/structs/__init__.py @@ -0,0 +1,15 @@ +import gdb +from ..pp import PrettyPrintable + + +class KernelStruct(PrettyPrintable): + def __init__(self, gdb_inferior: gdb.Value, impl) -> None: + super().__init__() + self._kstruct = gdb_inferior.cast(impl.get_type()) + + def get_struct_instance(self): + return self._kstruct + + @staticmethod + def get_type() -> gdb.Type : + return gdb.lookup_type("void").pointer() \ No newline at end of file