aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/raise-gcc.c
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2012-07-09 15:09:52 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2012-07-09 15:09:52 +0200
commita2c1791d894d8d421bda4344219bc971ec7faa30 (patch)
tree8570b4be17dc236ce4fd50453943fe986c7c24b7 /gcc/ada/raise-gcc.c
parenta6f0cb16c658263c398773c27387adc6b10b236c (diff)
downloadgcc-a2c1791d894d8d421bda4344219bc971ec7faa30.zip
gcc-a2c1791d894d8d421bda4344219bc971ec7faa30.tar.gz
gcc-a2c1791d894d8d421bda4344219bc971ec7faa30.tar.bz2
[multiple changes]
2012-07-09 Robert Dewar <dewar@adacore.com> * layout.adb, i-cstrea.ads, a-ststio.ads, prj-util.ads, sem_cat.adb, s-commun.ads, s-ficobl.ads, s-os_lib.ads, s-fileio.ads: Minor reformatting. 2012-07-09 Eric Botcazou <ebotcazou@adacore.com> * raise-gcc.c: Update comments. Fix typo. 2012-07-09 Thomas Quinot <quinot@adacore.com> * einfo.adb, einfo.ads, sem_attr.adb, sem_ch13.adb: Attribute Scalar_Storage_Order can be defined or queried for array types as well as record types. From-SVN: r189376
Diffstat (limited to 'gcc/ada/raise-gcc.c')
-rw-r--r--gcc/ada/raise-gcc.c39
1 files changed, 28 insertions, 11 deletions
diff --git a/gcc/ada/raise-gcc.c b/gcc/ada/raise-gcc.c
index b0f83a9..bc79c5d 100644
--- a/gcc/ada/raise-gcc.c
+++ b/gcc/ada/raise-gcc.c
@@ -207,6 +207,10 @@ db_phases (int phases)
* Tables for the dwarf zero cost case *
=======================================
+ They are fully documented in:
+ http://sourcery.mentor.com/public/cxx-abi/exceptions.pdf
+ Here is a shorter presentation, with some specific comments for Ada.
+
call_site []
-------------------------------------------------------------------
* region-start | region-length | landing-pad | first-action-index *
@@ -244,20 +248,32 @@ db_phases (int phases)
(see below), from which information may be retrieved to check if it
matches the exception being propagated.
- action-filter > 0 means there is a regular handler to be run,
-
- action-filter < 0 means there is a some "exception_specification"
- data to retrieve, which is only relevant for C++
- and should never show up for Ada.
-
- next-action points to the next entry in the list using a relative byte
- index. 0 indicates there is no other entry.
+ * action-filter > 0:
+ means there is a regular handler to be run The value is also passed
+ to the landing pad to dispatch the exception.
+
+ * action-filter < 0:
+ means there is a some "exception_specification" data to retrieve,
+ which is only relevant for C++ and should never show up for Ada.
+ (Exception specification specifies which exceptions can be thrown
+ by a function. Such filter is emitted around the body of C++
+ functions defined like:
+ void foo ([...]) throw (A, B) { [...] }
+ These can be viewed as negativ filter: the landing pad is branched
+ to for exceptions that doesn't match the filter and usually aborts
+ the program).
+
+ * next-action
+ points to the next entry in the list using a relative byte offset. 0
+ indicates there is no other entry.
ttypes []
---------------
* ttype-value *
---------------
+ This table is an array of addresses.
+
A null value indicates a catch-all handler. (Not used by Ada)
Non null values are used to match the exception being propagated:
@@ -1151,10 +1167,11 @@ __gnat_cleanupunwind_handler (int version,
{
/* Terminate when the end of the stack is reached. */
if ((phases & _UA_END_OF_STACK) != 0
-#ifdef __ia64__
+#if defined (__ia64__) && defined (USE_LIBUNWIND_EXCEPTIONS)
/* Strictely follow the ia64 ABI: when end of stack is reached,
- the callback will be called with a NULL stack pointer. */
- || _Unwind_GetREG (context, 12) == 0
+ the callback will be called with a NULL stack pointer.
+ No need for that when using libgcc unwinder. */
+ || _Unwind_GetGR (context, 12) == 0
#endif
)
__gnat_unhandled_except_handler (exception);