fix dependency check logic cause config always disabled
[lunaix-os.git] / lunaix-os / scripts / gdb / lunadbg / structs / __init__.py
1 import gdb
2 from ..pp import PrettyPrintable
3
4
5 class KernelStruct(PrettyPrintable):
6     def __init__(self, gdb_inferior: gdb.Value, impl) -> None:
7         super().__init__()
8         self._kstruct = gdb_inferior.cast(impl.get_type())
9
10     def get_struct_instance(self):
11         return self._kstruct
12
13     @staticmethod
14     def get_type() -> gdb.Type :
15         return gdb.lookup_type("void").pointer()