selftests/bpf: build tests with debug info
authorAndrii Nakryiko <andriin@fb.com>
Tue, 25 Jun 2019 22:56:28 +0000 (15:56 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Wed, 26 Jun 2019 12:42:54 +0000 (14:42 +0200)
Non-BPF (user land) part of selftests is built without debug info making
occasional debugging with gdb terrible. Build with debug info always.

Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
tools/testing/selftests/bpf/Makefile

index f2dbe20430677d5f281e770c45d84680e65385be..faeb8220daa2e5bf7b1f1ac03a99f11d9e37831b 100644 (file)
@@ -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