Unifying the Lunaix's Physical Memory Model (#28)
[lunaix-os.git] / lunaix-os / scripts / gdb / lunadbg / structs / pmem.py
diff --git a/lunaix-os/scripts/gdb/lunadbg/structs/pmem.py b/lunaix-os/scripts/gdb/lunadbg/structs/pmem.py
new file mode 100644 (file)
index 0000000..ed50b0c
--- /dev/null
@@ -0,0 +1,16 @@
+from gdb import Type, Value, lookup_type
+from . import KernelStruct
+
+class PMem(KernelStruct):
+    def __init__(self, gdb_inferior: Value) -> None:
+        super().__init__(gdb_inferior, PMem)
+
+    @staticmethod
+    def get_type():
+        return lookup_type("struct pmem").pointer()
+    
+    def pplist(self):
+        return self._kstruct["pplist"]
+    
+    def list_len(self):
+        return self._kstruct["list_len"]
\ No newline at end of file