mirror of
https://github.com/varun-r-mallya/Python-BPF.git
synced 2025-12-31 21:06:25 +00:00
parse context from first function argument to local symbol table
This commit is contained in:
@ -39,6 +39,16 @@ class VmlinuxHandler:
|
||||
and self.vmlinux_symtab[name]["value_type"] == AssignmentType.CONSTANT
|
||||
)
|
||||
|
||||
def get_vmlinux_struct_type(self, name):
|
||||
"""Check if name is a vmlinux struct type"""
|
||||
if (
|
||||
name in self.vmlinux_symtab
|
||||
and self.vmlinux_symtab[name]["value_type"] == AssignmentType.STRUCT
|
||||
):
|
||||
return self.vmlinux_symtab[name]["python_type"]
|
||||
else:
|
||||
raise ValueError(f"{name} is not a vmlinux struct type")
|
||||
|
||||
def is_vmlinux_struct(self, name):
|
||||
"""Check if name is a vmlinux struct"""
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user