Open Hugo96870 opened 8 months ago
This most likely means that write_trace.bpf.o is invalid. How are you compiling the ebpf code?
This most likely means that write_trace.bpf.o is invalid. How are you compiling the ebpf code?
The command I'm using is clang -O2 -target bpf -g -c write_trace.bpf.c -o write_trace.bpf.o
inside the folder with the cargo.toml file
This most likely means that write_trace.bpf.o is invalid. How are you compiling the ebpf code?
The command I'm using is
clang -O2 -target bpf -g -c write_trace.bpf.c -o write_trace.bpf.o
inside the folder with the cargo.toml file
With the approach of loading the object like: let mut bpf = Bpf::load_file("./write_trace.bpf.o")?; The following error pops up:
cargo run
Finished dev [unoptimized + debuginfo] target(s) in 0.09s
Running /home/hugo/Desktop/aya/target/debug/trace_write
a
thread 'main' panicked at trace_write/src/main.rs:18:73:
called Option::unwrap() on a None value
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
Aborted (core dumped)
Seems like what gets to the unwrap is undefined(/empty), but I don't know why
Hey!
I'm trying to run an eBPF program, but i keep getting this error:
Rust program:
The commented code was my initial approach that also does not work, The code is done following one of your examples
eBPF program
The error pops when I run the command
cargo run
Thanks!