Skip to content

Commit

Permalink
sh: dwarf unwinder support.
Browse files Browse the repository at this point in the history
This is a first cut at a generic DWARF unwinder for the kernel. It's
still lacking DWARF64 support and the DWARF expression support hasn't
been tested very well but it is generating proper stacktraces on SH for
WARN_ON() and NULL dereferences.

Signed-off-by: Matt Fleming <matt@console-pimps.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
  • Loading branch information
mfleming authored and pmundt committed Aug 13, 2009
1 parent 0eff9f6 commit bd35386
Show file tree
Hide file tree
Showing 10 changed files with 1,322 additions and 1 deletion.
8 changes: 8 additions & 0 deletions arch/sh/Kconfig.debug
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,14 @@ config DUMP_CODE

Those looking for more verbose debugging output should say Y.

config DWARF_UNWINDER
bool "Enable the DWARF unwinder for stacktraces"
select FRAME_POINTER
default n
help
Enabling this option will make stacktraces more accurate, at
the cost of an increase in overall kernel size.

config SH_NO_BSS_INIT
bool "Avoid zeroing BSS (to speed-up startup on suitable platforms)"
depends on DEBUG_KERNEL
Expand Down
4 changes: 4 additions & 0 deletions arch/sh/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,10 @@ ifeq ($(CONFIG_MCOUNT),y)
KBUILD_CFLAGS += -pg
endif

ifeq ($(CONFIG_DWARF_UNWINDER),y)
KBUILD_CFLAGS += -fasynchronous-unwind-tables
endif

libs-$(CONFIG_SUPERH32) := arch/sh/lib/ $(libs-y)
libs-$(CONFIG_SUPERH64) := arch/sh/lib64/ $(libs-y)

Expand Down
Loading

0 comments on commit bd35386

Please sign in to comment.