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. From: Jan Beulich --- 2.6.14/Makefile 2005-10-28 02:02:08.000000000 +0200 +++ 2.6.14-unwind-info/Makefile 2005-11-04 16:20:57.000000000 +0100 @@ -517,6 +517,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 --- 2.6.14/lib/Kconfig.debug 2005-10-28 02:02:08.000000000 +0200 +++ 2.6.14-unwind-info/lib/Kconfig.debug 2005-11-08 10:36:39.000000000 +0100 @@ -178,3 +178,12 @@ config FRAME_POINTER on some architectures or 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 + 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.