Explorar o código

[PATCH] CONFIG_UNWIND_INFO

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 <jbeulich@novell.com>
Cc: Miles Bader <uclinux-v850@lsi.nec.co.jp>
Cc: "Luck, Tony" <tony.luck@intel.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Kyle McMartin <kyle@mcmartin.ca>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Paul Mundt <lethal@linux-sh.org>,
Cc: Andi Kleen <ak@muc.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jan Beulich %!s(int64=19) %!d(string=hai) anos
pai
achega
604bf5a216
Modificáronse 2 ficheiros con 15 adicións e 0 borrados
  1. 4 0
      Makefile
  2. 11 0
      lib/Kconfig.debug

+ 4 - 0
Makefile

@@ -517,6 +517,10 @@ else
 CFLAGS		+= -fomit-frame-pointer
 CFLAGS		+= -fomit-frame-pointer
 endif
 endif
 
 
+ifdef CONFIG_UNWIND_INFO
+CFLAGS		+= -fasynchronous-unwind-tables
+endif
+
 ifdef CONFIG_DEBUG_INFO
 ifdef CONFIG_DEBUG_INFO
 CFLAGS		+= -g
 CFLAGS		+= -g
 endif
 endif

+ 11 - 0
lib/Kconfig.debug

@@ -195,6 +195,17 @@ config FRAME_POINTER
 	  some architectures or if you use external debuggers.
 	  some architectures or if you use external debuggers.
 	  If you don't debug the kernel, you can say N.
 	  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
 config FORCED_INLINING
 	bool "Force gcc to inline functions marked 'inline'"
 	bool "Force gcc to inline functions marked 'inline'"
 	depends on DEBUG_KERNEL
 	depends on DEBUG_KERNEL