01c08b2e0e090b6376d25c9860d9a08a20a6406f
[lunaix-os.git] / lunaix-os / scripts / gdb / lunadbg / structs / page.py
1 from gdb import Type, Value, lookup_type
2 from . import KernelStruct
3
4 class PageStruct(KernelStruct):
5     def __init__(self, gdb_inferior: Value) -> None:
6         super().__init__(gdb_inferior, PageStruct)
7         self.ref = self._kstruct["ref_counts"]
8         self.attr = self._kstruct["attr"]
9
10     @staticmethod
11     def get_type() -> Type:
12         return lookup_type("struct pp_struct").pointer()
13