mirror of
https://github.com/varun-r-mallya/Python-BPF.git
synced 2025-12-31 21:06:25 +00:00
Pass map_sym_tab to functions pass
This commit is contained in:
@ -27,8 +27,8 @@ def processor(source_code, filename, module):
|
||||
for func_node in bpf_chunks:
|
||||
print(f"Found BPF function: {func_node.name}")
|
||||
|
||||
maps_proc(tree, module, bpf_chunks)
|
||||
func_proc(tree, module, bpf_chunks)
|
||||
map_sym_tab = maps_proc(tree, module, bpf_chunks)
|
||||
func_proc(tree, module, bpf_chunks, map_sym_tab)
|
||||
# For now, we will parse the BPF specific parts of AST
|
||||
|
||||
# constants_processing(tree, module)
|
||||
|
||||
@ -86,7 +86,8 @@ def process_bpf_chunk(func_node, module, return_type):
|
||||
|
||||
return func
|
||||
|
||||
def func_proc(tree, module, chunks):
|
||||
|
||||
def func_proc(tree, module, chunks, map_sym_tab):
|
||||
for func_node in chunks:
|
||||
is_global = False
|
||||
for decorator in func_node.decorator_list:
|
||||
|
||||
@ -17,6 +17,7 @@ def maps_proc(tree, module, chunks):
|
||||
print(f"Found BPF map: {func_node.name}")
|
||||
process_bpf_map(func_node, module)
|
||||
continue
|
||||
return map_sym_tab
|
||||
|
||||
|
||||
def create_bpf_map(module, map_name, map_params):
|
||||
|
||||
Reference in New Issue
Block a user