Skip to contentSkip to conversation

selftests/bpf: build tests with debug info

PATCH Applied Andrii Nakryiko 2 participants 2 messages Jun 25, 2019 – Jun 26, 2019

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 selftests/bpf: build tests with debug info

Non-BPF (user land) part of selftests is built without debug info making occasional debugging with gdb terrible. Build with debug info always.

---
 tools/testing/selftests/bpf/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/bpf/Makefile +1 -1
index f2dbe2043067..faeb8220daa2 100644
@@ -15,7 +15,7 @@ LLC		?= llc
 LLVM_OBJCOPY	?= llvm-objcopy
 LLVM_READELF	?= llvm-readelf
 BTF_PAHOLE	?= pahole
-CFLAGS += -Wall -O2 -I$(APIDIR) -I$(LIBDIR) -I$(BPFDIR) -I$(GENDIR) $(GENFLAGS) -I../../../include \
+CFLAGS += -g -Wall -O2 -I$(APIDIR) -I$(LIBDIR) -I$(BPFDIR) -I$(GENDIR) $(GENFLAGS) -I../../../include \
 	  -Dbpf_prog_load=bpf_prog_test_load \
 	  -Dbpf_load_program=bpf_test_load_program
 LDLIBS += -lcap -lelf -lrt -lpthread
Signature · 1 line
2.17.1
maintainer Applied
#1 lore raw
Quoted 4 lines · Andrii Nakryiko

Non-BPF (user land) part of selftests is built without debug info making occasional debugging with gdb terrible. Build with debug info always.

Applied, thanks!