-
In file Error occurs when I rerun the uretprobe git:(main) ✗ go generate
/Volumes/TuyaExt/work/github/ebpf/examples/uretprobe/uretprobe.c:26:58: error: incomplete definition of type 'struct user_pt_regs'
bpf_probe_read(&event.line, sizeof(event.line), (void *)PT_REGS_RC(ctx));
^~~~~~~~~~~~~~~
../headers/bpf_tracing.h:209:46: note: expanded from macro 'PT_REGS_RC'
#define PT_REGS_RC(x) (((PT_REGS_ARM64 *)(x))->regs[0])
~~~~~~~~~~~~~~~~~~~~~~^
/Volumes/TuyaExt/work/github/ebpf/examples/uretprobe/uretprobe.c:26:58: note: forward declaration of 'struct user_pt_regs'
../headers/bpf_tracing.h:209:26: note: expanded from macro 'PT_REGS_RC'
#define PT_REGS_RC(x) (((PT_REGS_ARM64 *)(x))->regs[0])
^
../headers/bpf_tracing.h:200:45: note: expanded from macro 'PT_REGS_ARM64'
#define PT_REGS_ARM64 const volatile struct user_pt_regs
^
1 error generated.
Error: can't execute clang: exit status 1
exit status 1
main.go:25: running "go": exit status 1 Does something wrong with the definition of |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
In ebpf/examples/headers/bpf_tracing.h Lines 198 to 200 in 01ebd4c But in ebpf/examples/headers/common.h Lines 113 to 114 in 01ebd4c The definition for struct user_pt_regs on arm64 is not provided in the headers. Overall, I think, the examples do have a focus on aarch64 .
|
Beta Was this translation helpful? Give feedback.
-
I have solved this problem by appending the following snippet to
|
Beta Was this translation helpful? Give feedback.
I have solved this problem by appending the following snippet to
headers/common.h
.@florianl thanks.