mirror of
https://github.com/varun-r-mallya/Python-BPF.git
synced 2025-12-31 21:06:25 +00:00
Fix usage of local_sym_tab in expr_pass
This commit is contained in:
@ -61,7 +61,7 @@ def handle_assign(
|
||||
struct_info = structs_sym_tab[struct_type]
|
||||
if field_name in struct_info.fields:
|
||||
field_ptr = struct_info.gep(
|
||||
builder, local_sym_tab[var_name][0], field_name
|
||||
builder, local_sym_tab[var_name].var, field_name
|
||||
)
|
||||
val = eval_expr(
|
||||
func,
|
||||
@ -106,7 +106,6 @@ def handle_assign(
|
||||
builder.store(
|
||||
ir.Constant(ir.IntType(64), rval.value), local_sym_tab[var_name].var
|
||||
)
|
||||
# local_sym_tab[var_name] = var
|
||||
print(f"Assigned constant {rval.value} to {var_name}")
|
||||
elif isinstance(rval.value, str):
|
||||
str_val = rval.value.encode("utf-8") + b"\x00"
|
||||
|
||||
Reference in New Issue
Block a user