From 734a49b29541827d7ba95e7f70a3c0e572c4a934 Mon Sep 17 00:00:00 2001 From: Pragyansh Chaturvedi Date: Sun, 7 Sep 2025 17:22:24 +0530 Subject: [PATCH] emit BTF data using -g flag --- examples/c-form/Makefile | 8 ++++---- examples/c-form/ex3.bpf.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/c-form/Makefile b/examples/c-form/Makefile index f834240..90311c6 100644 --- a/examples/c-form/Makefile +++ b/examples/c-form/Makefile @@ -1,16 +1,16 @@ BPF_CLANG := clang CFLAGS := -O2 -emit-llvm -target bpf -c -SRC := example.bpf.c -OUT := example.bpf.ll -OBJECT := example.bpf.o +SRC := ex3.bpf.c +OUT := ex3.bpf.ll +OBJECT := ex3.bpf.o .PHONY: all clean all: $(OUT) object: $(SRC) - $(BPF_CLANG) -O2 -target bpf -c $< -o $(OBJECT) + $(BPF_CLANG) -O2 -g -target bpf -c $< -o $(OBJECT) $(OUT): $(SRC) object $(BPF_CLANG) $(CFLAGS) -S $< -o $@ diff --git a/examples/c-form/ex3.bpf.c b/examples/c-form/ex3.bpf.c index 74db01f..805e387 100644 --- a/examples/c-form/ex3.bpf.c +++ b/examples/c-form/ex3.bpf.c @@ -11,7 +11,7 @@ struct { __type(value, u64); } last SEC(".maps"); -SEC("kprobe/YOUR_PROBE_POINT") // Replace with actual probe point +SEC("kprobe/sys_clone") // Replace with actual probe point int do_trace(struct pt_regs *ctx) { u64 ts, *tsp, delta, key = 0;