pass context to memory allocation

This commit is contained in:
2025-10-22 12:01:52 +05:30
parent b3921c424d
commit f2bc7f1434
2 changed files with 14 additions and 14 deletions

View File

@ -15,9 +15,9 @@ from ctypes import c_int64, c_void_p # noqa: F401
@section("tracepoint/syscalls/sys_enter_execve")
def hello_world(ctx: struct_trace_event_raw_sys_enter) -> c_int64:
a = 2 + TASK_COMM_LEN + TASK_COMM_LEN
# b = ctx
b = ctx.id
print(f"Hello, World{TASK_COMM_LEN} and {a}")
# print(f"This is context field {b}")
print(f"This is context field {b}")
return c_int64(TASK_COMM_LEN + 2)