Bug#685559: gnat-4.6: Use GCC stack frame unwinder for GNU/kFreeBSD in tracebak.c
Package: gnat-4.6
Version: 4.6.3-5
Severity: important
Tags: patch
Usertags: kfreebsd
User: debian-bsd@lists.debian.org
Hello,
When building polyorb-2.8~20110207 for GNU/kFreeBSD it segfaults, see
https://buildd.debian.org/status/fetch.php?pkg=polyorb&arch=kfreebsd-i386&ver=2.8~20110207-3&stamp=1338587039
Building non-stripped versions of libgnat-4.6.so.1 and libgnarl-4.6.so.1
the gdb backtrace revealed that the stack unwinder with
USE_GENERIC_UNWINDER in gcc/ada/tracebak.c is the cause (as for
GNU/Hurd).
With USE_GCC_UNWINDER the build works, except for a linker error later
on, see separate bug reports for gnat-4.6 of gcc-interface/Makefile.in
changes for Hurd and kFreeBSD!
The patch is inlined below. Preferably it could be applied by modifying
the last part of the recent patch: ada-symbolic-tracebacks.diff
--- a/src/gcc/ada/tracebak.c 2012-08-20 14:10:21.000000000 +0200
+++ b/src/gcc/ada/tracebak.c 2012-08-20 18:30:35.000000000 +0200
@@ -320,7 +320,7 @@
/* Starting with GCC 4.6, -fomit-frame-pointer is turned on by default
for
32-bit x86/Linux as well and DWARF 2 unwind tables are emitted
instead.
See the x86-64 case below for the drawbacks with this approach. */
-#if (defined (linux) || defined(__GNU__)) && (__GNUC__ * 10 +
__GNUC_MINOR__ > 45)
+#if (defined (linux) || defined(__GNU__) ||
defined(__kFreeBSD_kernel__)) && (__GNUC__ * 10 + __GNUC_MINOR__ > 45)
#define USE_GCC_UNWINDER
#else
#define USE_GENERIC_UNWINDER
Reply to: