3 # DP: Don't try to use _Unwind_Backtrace on SJLJ targets.
4 # DP: See bug #387875, #388505, GCC PR 29206.
7 if [ $# -eq 3 -a "$2" = '-d' ]; then
10 elif [ $# -ne 1 ]; then
11 echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
16 patch $pdir -f --no-backup-if-mismatch -p1 < $0
17 #cd ${dir}gcc && autoconf
20 patch $pdir -f --no-backup-if-mismatch -R -p1 < $0
21 #rm ${dir}gcc/configure
24 echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
30 libjava
/sysdep
/generic
/backtrace.h |
17 +++++++++++++++++
31 1 file changed
, 17 insertions
(+)
33 Index
: src
/libjava
/sysdep
/generic
/backtrace.h
34 ===================================================================
35 --- src.orig
/libjava
/sysdep
/generic
/backtrace.h
2006-11-06 14:00:32.000000000 -0500
36 +++ src
/libjava
/sysdep
/generic
/backtrace.h
2006-11-06 14:04:38.000000000 -0500
37 @@
-13,6 +13,20 @@ details.
*/
39 #include <java-stack.h>
41 +#ifdef SJLJ_EXCEPTIONS
43 +#undef _Unwind_GetIPInfo
44 +#define _Unwind_GetIPInfo(ctx,ip_before_insn) \
45 + (abort
(), (void
) (ctx
), *ip_before_insn
= 1, 0)
47 +#undef _Unwind_GetRegionStart
48 +#define _Unwind_GetRegionStart(ctx) \
49 + (abort
(), (void
) (ctx
), 0)
51 +#undef _Unwind_Backtrace
52 +#define _Unwind_Backtrace(trace_fn,state_ptr) \
53 + (fallback_backtrace
(trace_fn
, state_ptr
))
55 /* Unwind through the call stack calling TRACE_FN with STATE
for every stack
56 frame. Returns the reason why the unwinding was stopped.
*/
58 @@
-20,4 +34,7 @@ fallback_backtrace
(_Unwind_Trace_Fn
, _J
60 return _URC_NO_REASON
;
63 +#endif /* SJLJ_EXCEPTIONS */