create debug info to subroutine type

This commit is contained in:
2025-10-27 02:19:08 +05:30
parent 8bd210cede
commit 238697469a
3 changed files with 63 additions and 11 deletions

View File

@ -4,7 +4,7 @@ from pythonbpf import bpf, section, bpfglobal, compile_to_ir
from pythonbpf import compile # noqa: F401
from vmlinux import TASK_COMM_LEN # noqa: F401
from vmlinux import struct_trace_event_raw_sys_enter # noqa: F401
from ctypes import c_int64, c_void_p # noqa: F401
from ctypes import c_int64, c_int32, c_void_p # noqa: F401
# from vmlinux import struct_uinput_device
@ -13,10 +13,10 @@ from ctypes import c_int64, c_void_p # noqa: F401
@bpf
@section("tracepoint/syscalls/sys_enter_execve")
def hello_world(ctx: struct_trace_event_raw_sys_enter) -> c_int64:
def hello_world(ctx: struct_trace_event_raw_sys_enter) -> c_int32:
b = ctx.id
print(f"This is context field {b}")
return c_int64(0)
return c_int32(0)
@bpf