From: Jan Beulich As a foundation for reliable stack unwinding, this adds a config option (available to all architectures except IA64 and those where the module loader might have problems with the resulting relocations) to enable the generation of frame unwind information. Signed-off-by: Jan Beulich Cc: Miles Bader Cc: "Luck, Tony" Cc: Ralf Baechle Cc: Kyle McMartin Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: "David S. Miller" Cc: Paul Mundt , Cc: Andi Kleen Signed-off-by: Andrew Morton --- Makefile | 4 ++++ lib/Kconfig.debug | 11 +++++++++++ 2 files changed, 15 insertions(+) diff -puN lib/Kconfig.debug~config_unwind_info lib/Kconfig.debug --- devel/lib/Kconfig.debug~config_unwind_info 2006-03-11 02:46:49.000000000 -0800 +++ devel-akpm/lib/Kconfig.debug 2006-03-11 02:46:49.000000000 -0800 @@ -204,6 +204,17 @@ config FRAME_POINTER some architectures or if you use external debuggers. If you don't debug the kernel, you can say N. +config UNWIND_INFO + bool "Compile the kernel with frame unwind information" + depends on !IA64 + depends on !MODULES || !(MIPS || PARISC || PPC || SUPERH || SPARC64 || V850) + 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 FORCED_INLINING bool "Force gcc to inline functions marked 'inline'" depends on DEBUG_KERNEL diff -puN Makefile~config_unwind_info Makefile --- Makefile~config_unwind_info 2006-03-11 02:46:49.000000000 -0800 +++ devel-akpm/Makefile 2006-03-11 02:46:49.000000000 -0800 @@ -477,6 +477,10 @@ else CFLAGS += -fomit-frame-pointer endif +ifdef CONFIG_UNWIND_INFO +CFLAGS += -fasynchronous-unwind-tables +endif + ifdef CONFIG_DEBUG_INFO CFLAGS += -g endif _