Unifying the Lunaix's Physical Memory Model (#28)
[lunaix-os.git] / lunaix-os / scripts / gdb / lunadbg / structs / pmem.py
1 from gdb import Type, Value, lookup_type
2 from . import KernelStruct
3
4 class PMem(KernelStruct):
5     def __init__(self, gdb_inferior: Value) -> None:
6         super().__init__(gdb_inferior, PMem)
7
8     @staticmethod
9     def get_type():
10         return lookup_type("struct pmem").pointer()
11     
12     def pplist(self):
13         return self._kstruct["pplist"]
14     
15     def list_len(self):
16         return self._kstruct["list_len"]