X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/095a899a9749b85443e546b1062026747445658c..c166bd62fbb907f95f79f621e2a2fb4fdde08e01:/lunaix-os/scripts/gdb/lunadbg/structs/pmem.py?ds=sidebyside diff --git a/lunaix-os/scripts/gdb/lunadbg/structs/pmem.py b/lunaix-os/scripts/gdb/lunadbg/structs/pmem.py new file mode 100644 index 0000000..ed50b0c --- /dev/null +++ b/lunaix-os/scripts/gdb/lunadbg/structs/pmem.py @@ -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