Add CONFIG_UNWIND_INFO From: Jan Beulich As a foundation for reliable stack unwinding, this adds a config option (available to all architectures except IA64) to enable the generation of frame unwind information. Signed-Off-By: Jan Beulich Signed-off-by: Andi Kleen Index: linux/Makefile =================================================================== --- linux.orig/Makefile +++ linux/Makefile @@ -512,6 +512,10 @@ CFLAGS += $(call add-align,CONFIG_CC_AL CFLAGS += $(call add-align,CONFIG_CC_ALIGN_LOOPS,-loops) CFLAGS += $(call add-align,CONFIG_CC_ALIGN_JUMPS,-jumps) +ifdef CONFIG_UNWIND_INFO +CFLAGS += -fasynchronous-unwind-tables +endif + ifdef CONFIG_FRAME_POINTER CFLAGS += -fno-omit-frame-pointer $(call cc-option,-fno-optimize-sibling-calls,) else Index: linux/lib/Kconfig.debug =================================================================== --- linux.orig/lib/Kconfig.debug +++ linux/lib/Kconfig.debug @@ -209,6 +209,16 @@ config FORCED_INLINING become the default in the future, until then this option is there to test gcc for this. +config UNWIND_INFO + bool "Compile the kernel with frame unwind information" + depends on !IA64 && !PPC64 + default DEBUG_KERNEL + help + If you say Y here the resulting kernel image will be slightly larger + but not slower, and it will give very useful debugging information. + If you don't debug the kernel, you can say N, but we may not be able + to solve problems without frame unwind information or frame pointers. + config RCU_TORTURE_TEST tristate "torture tests for RCU" depends on DEBUG_KERNEL