X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/92f6e64a6da763c45ff9f4ab5eafcab3d8766dcb..b60166b327a9108b07e3069fa6568a451529ffd9:/lunaix-os/scripts/gdb/lunadbg/structs/page.py diff --git a/lunaix-os/scripts/gdb/lunadbg/structs/page.py b/lunaix-os/scripts/gdb/lunadbg/structs/page.py new file mode 100644 index 0000000..01c08b2 --- /dev/null +++ b/lunaix-os/scripts/gdb/lunadbg/structs/page.py @@ -0,0 +1,13 @@ +from gdb import Type, Value, lookup_type +from . import KernelStruct + +class PageStruct(KernelStruct): + def __init__(self, gdb_inferior: Value) -> None: + super().__init__(gdb_inferior, PageStruct) + self.ref = self._kstruct["ref_counts"] + self.attr = self._kstruct["attr"] + + @staticmethod + def get_type() -> Type: + return lookup_type("struct pp_struct").pointer() +