build/unix/build-gcc/gcc-bt.patch

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/build/unix/build-gcc/gcc-bt.patch	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,25 @@
     1.4 +--- gcc-4.7.3/gcc/diagnostic.c	2012-02-02 15:46:06.000000000 -0500
     1.5 ++++ gcc-patched/gcc/diagnostic.c	2013-05-23 14:07:10.756527912 -0400
     1.6 +@@ -31,6 +31,10 @@
     1.7 + #include "intl.h"
     1.8 + #include "diagnostic.h"
     1.9 + 
    1.10 ++#include <execinfo.h>
    1.11 ++#include <unistd.h>
    1.12 ++#include <fcntl.h>
    1.13 ++#include <stdio.h>
    1.14 + #define pedantic_warning_kind(DC)			\
    1.15 +   ((DC)->pedantic_errors ? DK_ERROR : DK_WARNING)
    1.16 + #define permissive_error_kind(DC) ((DC)->permissive ? DK_WARNING : DK_ERROR)
    1.17 +@@ -237,6 +241,11 @@
    1.18 +       if (context->abort_on_error)
    1.19 + 	real_abort ();
    1.20 + 
    1.21 ++      {
    1.22 ++        void *stack[100];
    1.23 ++        int count = backtrace(stack, 100);
    1.24 ++        backtrace_symbols_fd(stack, count, STDERR_FILENO);
    1.25 ++      }
    1.26 +       fnotice (stderr, "Please submit a full bug report,\n"
    1.27 + 	       "with preprocessed source if appropriate.\n"
    1.28 + 	       "See %s for instructions.\n", bug_report_url);

mercurial