kgdb: Do not allow function tracing of kgdb code
Subsystems (2)
PATCH v2 1/1 kgdb: Do not allow function tracing of kgdb code
As function tracing the kgdb code can cause issues, as kgdb is a debugger itself, do not trace the kgdb functions.
Signed-off-by Steven Rostedt <[email protected]>
---
v2 - added all files in kernel/debug
arch/x86/kernel/Makefile +1 -0
@@ -15,6 +15,7 @@ CFLAGS_REMOVE_pvclock.o = -pg CFLAGS_REMOVE_kvmclock.o = -pg CFLAGS_REMOVE_ftrace.o = -pg CFLAGS_REMOVE_early_printk.o = -pg +CFLAGS_REMOVE_kgdb.o = -pg endif obj-y := process_$(BITS).o signal.o entry_$(BITS).o
kernel/debug/Makefile +6 -0
@@ -2,5 +2,11 @@ # Makefile for the linux kernel debugger # +# Do not function trace debug files +ifdef CONFIG_FUNCTION_TRACER +ORIG_CFLAGS := $(KBUILD_CFLAGS) +KBUILD_CFLAGS = $(subst -pg,,$(ORIG_CFLAGS)) +endif + obj-$(CONFIG_KGDB) += debug_core.o gdbstub.o obj-$(CONFIG_KGDB_KDB) += kdb/
Quoted 4 lines · Steven Rostedt
As function tracing the kgdb code can cause issues, as kgdb is a debugger itself, do not trace the kgdb functions.
Signed-off-by Steven Rostedt <[email protected]>
You beat me to creating the patch, because I was in the process of testing the same modification before posting. :-)
Acked-by Jason Wessel <[email protected]>
Thanks,
Jason.