aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/tracebak.c
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2012-12-05 12:15:35 +0100
committerArnaud Charlet <charlet@gcc.gnu.org>2012-12-05 12:15:35 +0100
commit06ad40d3ec3ec2333701f18f6dc6bbf0b9a023ec (patch)
treec11a325254c0fff96f54a201f14e401c959ece35 /gcc/ada/tracebak.c
parentaf31bd57502fd7fef4891658c74cb5fdb3c160e4 (diff)
downloadgcc-06ad40d3ec3ec2333701f18f6dc6bbf0b9a023ec.zip
gcc-06ad40d3ec3ec2333701f18f6dc6bbf0b9a023ec.tar.gz
gcc-06ad40d3ec3ec2333701f18f6dc6bbf0b9a023ec.tar.bz2
[multiple changes]
2012-12-05 Thomas Quinot <quinot@adacore.com> * par_sco.adb, scos.ads, put_scos.adb, put_scos.ads, get_scos.adb: Generation of SCOs for aspects. 2012-12-05 Thomas Quinot <quinot@adacore.com> * sem_prag.adb (Check_Precondition_Postcondition): Remove redundant call to Set_SCO_Pragma_Enabled (the pragma will be rewritten into a pragma Check later on, and the call will be made when processing the rewritten pragma). (Analyze_Pragma, case Pragma_Check): Omit call to Set_SCO_Pragma_Enabled if Split_PPC is set. 2012-12-05 Olivier Hainque <hainque@adacore.com> * tracebak.c: Add partial support for Lynx178. 2012-12-05 Hristian Kirtchev <kirtchev@adacore.com> * sem_attr.adb (Analyze_Attribute): Improve the error message related to loop assertions. 2012-12-05 Gary Dismukes <dismukes@adacore.com> * atree.ads: Minor reformatting. From-SVN: r194211
Diffstat (limited to 'gcc/ada/tracebak.c')
-rw-r--r--gcc/ada/tracebak.c21
1 files changed, 18 insertions, 3 deletions
diff --git a/gcc/ada/tracebak.c b/gcc/ada/tracebak.c
index 2c8335d..01b9654 100644
--- a/gcc/ada/tracebak.c
+++ b/gcc/ada/tracebak.c
@@ -287,9 +287,10 @@ __gnat_backtrace (void **array,
#error Unhandled darwin architecture.
#endif
-/*------------------------ PPC AIX/Older Darwin -------------------------*/
+/*---------------------- PPC AIX/PPC Lynx 178/Older Darwin ------------------*/
#elif ((defined (_POWER) && defined (_AIX)) || \
-(defined (__ppc__) && defined (__APPLE__)))
+ (defined (__powerpc__) && defined (__Lynx__) && !defined(__ELF__)) || \
+ (defined (__ppc__) && defined (__APPLE__)))
#define USE_GENERIC_UNWINDER
@@ -307,9 +308,23 @@ struct layout
should to feature a null backchain, AIX might expose a null return
address instead. */
+/* Then LynxOS-178 features yet another variation, with return_address
+ == &__start, which we only add conditionally as this symbol is not
+ necessarily present elsewhere. Beware that &bla returns the
+ address of a descriptor when "bla" is a function. Getting the code
+ address requires an extra dereference. */
+
+#if defined (__Lynx__)
+extern void __start();
+#define EXTRA_STOP_CONDITION(CURRENT) ((CURRENT)->return_address == *(void**)&__start)
+#else
+#define EXTRA_STOP_CONDITION(CURRENT) (0)
+#endif
+
#define STOP_FRAME(CURRENT, TOP_STACK) \
(((void *) (CURRENT) < (TOP_STACK)) \
- || (CURRENT)->return_address == NULL)
+ || (CURRENT)->return_address == NULL \
+ || EXTRA_STOP_CONDITION(CURRENT))
/* The PPC ABI has an interesting specificity: the return address saved by a
function is located in it's caller's frame, and the save operation only