[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#681998: gnat-4.6: Use GCC stack frame unwinder for GNU/Hurd in tracebak.c



Package: gnat-4.6
Version: 4.6.2-4
Severity: important
Tags: patch
Usertags: hurd
User: debian-hurd@lists.debian.org

Hello,

Trying to find the problems with gprbuild, see bug #673015, the
traceback function used for GNU/Hurd caused a segfault for gprconfig.
Digging further revealed that the GNU/Hurd stack frame does not seem to
be static enough to define USE_GENERIC_UNWINDER in gcc/ada/tracebak.c.

However, USE_GCC_UNWINDER works (and the dummy version of course)! The
patch is inlined below.

--- a/src/gcc/ada/tracebak.c 2011-09-19 11:10:42.000000000 +0200
+++ b/src/gcc/ada/tracebak.c 2012-07-17 08:46:29.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) && (__GNUC__ * 10 + __GNUC_MINOR__ > 45)
+#if (defined (linux) || defined(__GNU__)) && (__GNUC__ * 10 +
__GNUC_MINOR__ > 45)
 #define USE_GCC_UNWINDER
 #else
 #define USE_GENERIC_UNWINDER


Reply to: