aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/raise-gcc.c
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2011-08-30 16:01:42 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2011-08-30 16:01:42 +0200
commitc199ccf75867fa7287570ff1ec19ef76cc9d5ea6 (patch)
tree1ba170de5f902002c4ad31be1aa6f3986ada28bf /gcc/ada/raise-gcc.c
parentdff99e1a52a750cb5c1be4e5f0ccb1567e0ca015 (diff)
downloadgcc-c199ccf75867fa7287570ff1ec19ef76cc9d5ea6.zip
gcc-c199ccf75867fa7287570ff1ec19ef76cc9d5ea6.tar.gz
gcc-c199ccf75867fa7287570ff1ec19ef76cc9d5ea6.tar.bz2
[multiple changes]
2011-08-30 Gary Dismukes <dismukes@adacore.com> * sem_res.adb (Valid_Conversion): Revise test for implicit anonymous access conversions to check that the conversion is a rewritten node, rather than just having Comes_From_Source set to False, which wasn't sufficient. 2011-08-30 Robert Dewar <dewar@adacore.com> * exp_ch9.adb, sem_ch9.adb, sem_ch6.adb, exp_disp.adb, g-socket.ads: Minor reformatting. 2011-08-30 Thomas Quinot <quinot@adacore.com> * sem_util.adb: Minor reformatting. 2011-08-30 Tristan Gingold <gingold@adacore.com> * raise-gcc.c: Never catch exception if _UA_FORCE_UNWIND flag is set, to be compliant with the ABI. From-SVN: r178310
Diffstat (limited to 'gcc/ada/raise-gcc.c')
-rw-r--r--gcc/ada/raise-gcc.c33
1 files changed, 20 insertions, 13 deletions
diff --git a/gcc/ada/raise-gcc.c b/gcc/ada/raise-gcc.c
index 6ea59ae..729b76c 100644
--- a/gcc/ada/raise-gcc.c
+++ b/gcc/ada/raise-gcc.c
@@ -217,7 +217,7 @@ db (int db_code, char * msg_format, ...)
static void
db_phases (int phases)
{
- phase_descriptor *a = phase_descriptors;
+ const phase_descriptor *a = phase_descriptors;
if (! (db_accepted_codes() & DB_PHASES))
return;
@@ -901,6 +901,7 @@ is_handled_by (_Unwind_Ptr choice, _GNAT_Exception * propagated_exception)
static void
get_action_description_for (_Unwind_Context *uw_context,
_Unwind_Exception *uw_exception,
+ _Unwind_Action uw_phase,
region_descriptor *region,
action_descriptor *action)
{
@@ -965,17 +966,22 @@ get_action_description_for (_Unwind_Context *uw_context,
/* Positive filters are for regular handlers. */
else if (ar_filter > 0)
{
- /* See if the filter we have is for an exception which matches
- the one we are propagating. */
- _Unwind_Ptr choice = get_ttype_entry_for (region, ar_filter);
-
- if (is_handled_by (choice, gnat_exception))
- {
- action->kind = handler;
- action->ttype_filter = ar_filter;
- action->ttype_entry = choice;
- return;
- }
+ /* Do not catch an exception if the _UA_FORCE_UNWIND flag is
+ passed (to follow the ABI). */
+ if (!(uw_phase & _UA_FORCE_UNWIND))
+ {
+ /* See if the filter we have is for an exception which
+ matches the one we are propagating. */
+ _Unwind_Ptr choice = get_ttype_entry_for (region, ar_filter);
+
+ if (is_handled_by (choice, gnat_exception))
+ {
+ action->kind = handler;
+ action->ttype_filter = ar_filter;
+ action->ttype_entry = choice;
+ return;
+ }
+ }
}
/* Negative filter values are for C++ exception specifications.
@@ -1128,7 +1134,8 @@ PERSONALITY_FUNCTION (version_arg_t version_arg,
/* Search the call-site and action-record tables for the action associated
with this IP. */
- get_action_description_for (uw_context, uw_exception, &region, &action);
+ get_action_description_for (uw_context, uw_exception, uw_phases,
+ &region, &action);
db_action_for (&action, uw_context);
/* Whatever the phase, if there is nothing relevant in this frame,