Hello!
Without -fasynchronous-unwind-tables, FDE is not generated for
backtrace_full and backtrace_simple wrappers. Without FDE, unwinding
terminates at these functions.
Attached patch fixes this problem by adding
-fasynchronous-unwind-tables, and this way forcing FDEs for all
functions. With this change, btest passes OK, failing log and
runtime/pprof from libgo testsuite also pass OK.
BTW: It would be enough to compile only backtrace.c and simple.c with
-fasynchronous-unwind-tables, since critical wrapper functions live
here.
2012-10-01 Uros Bizjak
PR other/54761
* Makefile.am (AM_CFLAGS): Add -fasynchronous-unwind-tables.
* Makefile.in: Regenerate.
Patch was bootstrapped and regression tested on x86_64-pc-linux-gnu
{,-m32} and alphaev68-pc-linux-gnu (where fixes all mentioned
unwinding failures).
OK for mainline?
Uros.
Index: ChangeLog
===
--- ChangeLog (revision 191932)
+++ ChangeLog (working copy)
@@ -1,3 +1,9 @@
+2012-10-01 Uros Bizjak
+
+ PR other/54761
+ * Makefile.am (AM_CFLAGS): Add -fasynchronous-unwind-tables.
+ * Makefile.in: Regenerate.
+
2012-09-29 Ian Lance Taylor
PR other/54749
Index: Makefile.am
===
--- Makefile.am (revision 191932)
+++ Makefile.am (working copy)
@@ -34,7 +34,7 @@
AM_CPPFLAGS = -I $(top_srcdir)/../include -I $(top_srcdir)/../libgcc \
-I ../libgcc -I ../gcc/include -I $(MULTIBUILDTOP)../../gcc/include
-AM_CFLAGS = $(WARN_FLAGS) $(PIC_FLAG)
+AM_CFLAGS = $(WARN_FLAGS) $(PIC_FLAG) -fasynchronous-unwind-tables
noinst_LTLIBRARIES = libbacktrace.la
Index: Makefile.in
===
--- Makefile.in (revision 191932)
+++ Makefile.in (working copy)
@@ -253,7 +253,7 @@
AM_CPPFLAGS = -I $(top_srcdir)/../include -I $(top_srcdir)/../libgcc \
-I ../libgcc -I ../gcc/include -I $(MULTIBUILDTOP)../../gcc/include
-AM_CFLAGS = $(WARN_FLAGS) $(PIC_FLAG)
+AM_CFLAGS = $(WARN_FLAGS) $(PIC_FLAG) -fasynchronous-unwind-tables
noinst_LTLIBRARIES = libbacktrace.la
libbacktrace_la_SOURCES = \
backtrace.h \