Support to multi-threading and pthread interface (POSIX.1-2008) (#23)
[lunaix-os.git] / 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 (file)
index 0000000..01c08b2
--- /dev/null
@@ -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()
+