diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-07-09 13:09:52 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-07-09 13:09:52 +0000 |
commit | b43a577091bfbb4df6ed66fcb603ef46243bef3b (patch) | |
tree | 8570b4be17dc236ce4fd50453943fe986c7c24b7 /gcc/ada/raise-gcc.c | |
parent | a940e5c94021c06e58a4fdca57db328ff599307e (diff) | |
download | gcc-b43a577091bfbb4df6ed66fcb603ef46243bef3b.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@189376 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/raise-gcc.c')
-rw-r--r-- | gcc/ada/raise-gcc.c | 39 |
1 files changed, 28 insertions, 11 deletions
diff --git a/gcc/ada/raise-gcc.c b/gcc/ada/raise-gcc.c index b0f83a9bde5..bc79c5d82a1 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); |