add alloc for only i64

This commit is contained in:
2025-10-24 02:06:39 +05:30
parent 36a1a0903e
commit 64674cf646
7 changed files with 79 additions and 20 deletions

View File

@ -52,3 +52,18 @@ class VmlinuxHandlerRegistry:
if cls._handler is None:
return None
return cls._handler.get_vmlinux_struct_type(name)
@classmethod
def has_field(cls, vmlinux_struct_name, field_name):
"""Check if a vmlinux struct has a specific field"""
if cls._handler is None:
return False
return cls._handler.has_field(vmlinux_struct_name, field_name)
@classmethod
def get_field_type(cls, vmlinux_struct_name, field_name):
"""Get the type of a field in a vmlinux struct"""
if cls._handler is None:
return None
assert isinstance(cls._handler, VmlinuxHandler)
return cls._handler.get_field_type(vmlinux_struct_name, field_name)