summaryrefslogtreecommitdiff
path: root/gcc/ada/tracebak.c
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2005-11-15 13:54:25 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2005-11-15 13:54:25 +0000
commit986fb7dd6375783b9f492a215dd9d767575cdb7c (patch)
tree42a177a53177be2db515cfdae24464e13832f3a3 /gcc/ada/tracebak.c
parent8820a966cecaf84bbf63cdafa3e616239e7a1fbd (diff)
downloadgcc-986fb7dd6375783b9f492a215dd9d767575cdb7c.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@106964 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/tracebak.c')
-rw-r--r--gcc/ada/tracebak.c16
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