summaryrefslogtreecommitdiffstats
path: root/gcc/ada/tracebak.c
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2005-06-16 08:21:46 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2005-06-16 08:21:46 +0000
commit5596b963691a36e388cd1a6ac2f2ec3b98f1cd45 (patch)
treeed2e629f0eec3c715bd1067b2330160070c0cfd0 /gcc/ada/tracebak.c
parent70b44d38dd0003b4cd7bc87bf4a79e1ab830dce5 (diff)
downloadppe42-gcc-5596b963691a36e388cd1a6ac2f2ec3b98f1cd45.tar.gz
ppe42-gcc-5596b963691a36e388cd1a6ac2f2ec3b98f1cd45.zip
2005-06-14 Olivier Hainque <hainque@adacore.com>
Eric Botcazou <ebotcazou@adacore.com> * s-mastop-irix.adb (Pop_Frame): Revert shorcuts avoiding calls to exc_unwind, now that we are generating proper .debug_frame output for that target. * tracebak.c: Remove the mips-irix section, as we are now using the s-mastop based unwinder again. Under SPARC/Solaris, take into account the stack bias to compute the frame offset. The stack bias is 0 for the V8 ABI and 2047 for the V9 ABI. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@101012 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/tracebak.c')
-rw-r--r--gcc/ada/tracebak.c26
1 files changed, 21 insertions, 5 deletions
diff --git a/gcc/ada/tracebak.c b/gcc/ada/tracebak.c
index 773db24186a..ddeec9aee68 100644
--- a/gcc/ada/tracebak.c
+++ b/gcc/ada/tracebak.c
@@ -242,7 +242,7 @@ struct layout
#define BASE_SKIP 1
-/*-------------------------- Sparc Solaris -----------------------------*/
+/*-------------------------- SPARC Solaris -----------------------------*/
#elif defined (sun) && defined (sparc)
@@ -257,8 +257,14 @@ struct layout
void *return_address;
};
+#ifdef __arch64__
+#define STACK_BIAS 2047 /* V9 ABI */
+#else
+#define STACK_BIAS 0 /* V8 ABI */
+#endif
+
#define FRAME_LEVEL 0
-#define FRAME_OFFSET (14 * (sizeof (void*)))
+#define FRAME_OFFSET (14 * sizeof (void*) + STACK_BIAS)
#define PC_ADJUST 0
#define STOP_FRAME(CURRENT, TOP_STACK) \
((CURRENT)->return_address == 0|| (CURRENT)->next == 0 \
@@ -324,12 +330,22 @@ struct layout
|| ((*((ptr) - 1) & 0xff) == 0xff) \
|| (((*(ptr) & 0xd0ff) == 0xd0ff))))
-/*------------------------------- mips-irix -------------------------------*/
+/*----------------------------- x86_64 ---------------------------------*/
-#elif defined (__mips) && defined (__sgi)
+#elif defined (__x86_64__)
#define USE_GCC_UNWINDER
-#define PC_ADJUST -8
+/* The generic unwinder is not used for this target because it is based
+ on frame layout assumptions that are not reliable on this target (the
+ rbp register is very likely used for something else than storing the
+ frame pointer in optimized code). Hence, we use the GCC unwinder
+ based on DWARF 2 call frame information, although it has the drawback
+ of not being able to unwind through frames compiled without DWARF 2
+ information.
+*/
+
+#define PC_ADJUST -2
+/* The minimum size of call instructions on this architecture is 2 bytes */
#endif
OpenPOWER on IntegriCloud