summaryrefslogtreecommitdiffstats
path: root/gcc/ada
diff options
context:
space:
mode:
authorbosch <bosch@138bc75d-0d04-0410-961f-82ee72b054a4>2003-03-04 20:14:59 +0000
committerbosch <bosch@138bc75d-0d04-0410-961f-82ee72b054a4>2003-03-04 20:14:59 +0000
commit15f50c412b28a433a01a751d3ea608976d826e42 (patch)
tree468e170ab74680bf828abe7663ade351abdcebfe /gcc/ada
parentd68c6656d0f26a07b0507db4ddaa6db2a23d8634 (diff)
downloadppe42-gcc-15f50c412b28a433a01a751d3ea608976d826e42.tar.gz
ppe42-gcc-15f50c412b28a433a01a751d3ea608976d826e42.zip
ada/9911
* a-except.adb (Unwind_RaiseException): Import a GNAT specific wrapper, which name remains constant whatever underlying GCC scheme. * raise.c (__gnat_Unwind_RaiseException): New wrappers, providing the stable interface needed for a-except. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@63795 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada')
-rw-r--r--gcc/ada/ChangeLog10
-rw-r--r--gcc/ada/a-except.adb2
-rw-r--r--gcc/ada/raise.c37
3 files changed, 43 insertions, 6 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index eb76ef61b65..2994fcfcacf 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,13 @@
+2003-03-04 Olivier Hainque <hainque@act-europe.fr>
+
+ ada/9911
+ * a-except.adb (Unwind_RaiseException): Import a GNAT specific
+ wrapper, which name remains constant whatever underlying GCC
+ scheme.
+
+ * raise.c (__gnat_Unwind_RaiseException): New wrappers, providing
+ the stable interface needed for a-except.
+
2003-03-02 Andreas Jaeger <aj@suse.de>
* gnat_ug_unx.texi, gnat_ug_vms.texi, gnat_ug_vxw.texi,
diff --git a/gcc/ada/a-except.adb b/gcc/ada/a-except.adb
index e18d0e8fa53..979f11e41c9 100644
--- a/gcc/ada/a-except.adb
+++ b/gcc/ada/a-except.adb
@@ -199,7 +199,7 @@ package body Ada.Exceptions is
function Unwind_RaiseException
(E : access GNAT_GCC_Exception)
return Unwind_Reason_Code;
- pragma Import (C, Unwind_RaiseException, "_Unwind_RaiseException");
+ pragma Import (C, Unwind_RaiseException, "__gnat_Unwind_RaiseException");
-----------------------
-- Local Subprograms --
diff --git a/gcc/ada/raise.c b/gcc/ada/raise.c
index 087448a4d50..4db4d20a4d0 100644
--- a/gcc/ada/raise.c
+++ b/gcc/ada/raise.c
@@ -597,21 +597,48 @@ __gnat_eh_personality (version, actions, exception_class, ue_header, context)
}
-#else /* IN_RTS - For eh personality routine */
+/* If the underlying GCC scheme for exception handling is SJLJ, the standard
+ propagation routine (_Unwind_RaiseException) is actually renamed using a
+ #define directive (see unwing-sjlj.c). We need a consistently named
+ interface to import from a-except, so stubs are defined here. */
+
+#ifdef __USING_SJLJ_EXCEPTIONS__
+
+_Unwind_Reason_Code
+__gnat_Unwind_RaiseException (e)
+ struct _Unwind_Exception *e;
+{
+ return _Unwind_SjLj_RaiseException (e);
+}
+
+#else
+/* __USING_SJLJ_EXCEPTIONS__ not defined */
+
+void
+__gnat_Unwind_RaiseException (e)
+ struct _Unwind_Exception *e;
+{
+ return _Unwind_RaiseException (e);
+}
+
+#endif
+
+#else
+/* IN_RTS not defined */
/* The calls to the GCC runtime interface for exception raising are currently
issued from a-except.adb, which is used by both the runtime library and
the compiler. As the compiler binary is not linked against the GCC runtime
library, we need a stub for this interface in the compiler case. */
+/* Since we don't link the compiler with a host libgcc, we should not be
+ using the GCC eh mechanism for the compiler and so expect this function
+ never to be called. */
_Unwind_Reason_Code
-_Unwind_RaiseException (e)
+__gnat_Unwind_RaiseException (e)
struct _Unwind_Exception *e ATTRIBUTE_UNUSED;
{
- /* Since we don't link the compiler with a host libgcc, we should not be
- using the GCC eh mechanism for the compiler and so expect this function
- never to be called. */
abort ();
}
OpenPOWER on IntegriCloud