diff options
author | Matthew Gingell <gingell@adacore.com> | 2005-11-15 14:54:25 +0100 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2005-11-15 14:54:25 +0100 |
commit | 748d8778ede2249ee70323886d36fcdd5c08248d (patch) | |
tree | 42a177a53177be2db515cfdae24464e13832f3a3 /gcc/ada/tracebak.c | |
parent | e1ac6e5b2140d274f5e37b948e3074a284c3c3e6 (diff) | |
download | gcc-748d8778ede2249ee70323886d36fcdd5c08248d.tar.gz |
tb-gcc.c (trace_callback): Work around problem with _Unwind_GetIP on ia64 HP-UX.
2005-11-14 Matthew Gingell <gingell@adacore.com>
Olivier Hainque <hainque@adacore.com>
* tb-gcc.c (trace_callback): Work around problem with _Unwind_GetIP on
ia64 HP-UX.
* tracebak.c (ia64 configuration): Enable _Unwind_Backtrace driven
tracebacks on ia64 HP-UX and provide explanatory comment.
Enable backtraces on ia64 GNU/Linux.
(x86 configuration): Bump FRAME_LEVEL to 1 to ensure we retrieve a real
base pointer from builtin_frame_address. Adjust BASE_SKIP accordingly.
From-SVN: r106964
Diffstat (limited to 'gcc/ada/tracebak.c')
-rw-r--r-- | gcc/ada/tracebak.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/gcc/ada/tracebak.c b/gcc/ada/tracebak.c index f7c431b77b9..db825d155ee 100644 --- a/gcc/ada/tracebak.c +++ b/gcc/ada/tracebak.c @@ -6,7 +6,7 @@ * * * C Implementation File * * * - * Copyright (C) 2000-2005 Ada Core Technologies, Inc. * + * Copyright (C) 2000-2005, AdaCore * * * * GNAT is free software; you can redistribute it and/or modify it under * * terms of the GNU General Public License as published by the Free Soft- * @@ -300,7 +300,11 @@ struct layout }; #define LOWEST_ADDR 0 -#define FRAME_LEVEL 0 +#define FRAME_LEVEL 1 +/* builtin_frame_address (1) is expected to work on this target, and (0) might + return the soft stack pointer, which does not designate a location where a + backchain and a return address might be found. */ + #define FRAME_OFFSET 0 #define PC_ADJUST -2 #define STOP_FRAME(CURRENT, TOP_STACK) \ @@ -309,7 +313,7 @@ struct layout || (CURRENT)->return_address == 0|| (CURRENT)->next == 0 \ || (void *) (CURRENT) < (TOP_STACK)) -#define BASE_SKIP 1 +#define BASE_SKIP (1+FRAME_LEVEL) /* On i386 architecture we check that at the call point we really have a call insn. Possible call instructions are: @@ -349,9 +353,13 @@ struct layout /*----------------------------- ia64 ---------------------------------*/ -#elif defined (__ia64__) && !defined (USE_LIBUNWIND_EXCEPTIONS) +#elif defined (__ia64__) && (defined (linux) || defined (__hpux__)) #define USE_GCC_UNWINDER +/* Use _Unwind_Backtrace driven exceptions on ia64 HP-UX and ia64 + GNU/Linux, where _Unwind_Backtrace is provided by the system unwind + library. On HP-UX 11.23 this requires patch PHSS_33352, which adds + _Unwind_Backtrace to the system unwind library. */ #define PC_ADJUST -16 /* Every call on ia64 is part of a 128 bit bundle, so an adjustment of |