Skip to content

Commit ef502bc

Browse files
committed
add error for unsupported constant
1 parent 393aaea commit ef502bc

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

examples/execve3.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ def hello_again(ctx: c_void_p) -> c_int64:
4343
key = 4
4444
last().update(key, ts)
4545
key = 5
46+
st = "st"
4647
last().update(key, ts)
4748
return c_int64(0)
4849

pythonbpf/functions_pass.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ def handle_assign(func, module, builder, stmt, map_sym_tab, local_sym_tab):
5353
local_sym_tab[var_name])
5454
# local_sym_tab[var_name] = var
5555
print(f"Assigned constant {rval.value} to {var_name}")
56+
else:
57+
print("Unsupported constant type")
5658
elif isinstance(rval, ast.Call):
5759
if isinstance(rval.func, ast.Name):
5860
call_type = rval.func.id

0 commit comments

Comments
 (0)