Currently, we only support zero-initialization of a struct object, and filling in the struct fields individually later.
@bpf
@struct
class data_t:
pid: c_uint64
ts: c_uint64
@bpf
@section("tracepoint/syscalls/sys_enter_execve")
def hello_world(ctx: c_void_p) -> c_int64:
dat = data_t()
dat.pid = 123
A better way of assigning fields would be directly from the constructor:
Currently, we only support zero-initialization of a struct object, and filling in the struct fields individually later.
A better way of assigning fields would be directly from the constructor: