summaryrefslogtreecommitdiff
path: root/gcc/ada/raise-gcc.c
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2008-08-20 16:13:06 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2008-08-20 16:13:06 +0000
commitc2192989553b7c6427366717fa931016952e183a (patch)
tree3f744fd84b412ba50bc714be2f6d4c5e50a2ea0f /gcc/ada/raise-gcc.c
parent1ed6b32e64ee2e4d3beee36afe9dca059d2fd8bb (diff)
downloadgcc-c2192989553b7c6427366717fa931016952e183a.tar.gz
2008-08-20 Eric Botcazou <ebotcazou@adacore.com>
* raise-gcc.c: Fix formatting nits. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@139334 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/raise-gcc.c')
-rw-r--r--gcc/ada/raise-gcc.c46
1 files changed, 19 insertions, 27 deletions
diff --git a/gcc/ada/raise-gcc.c b/gcc/ada/raise-gcc.c
index e2662e14f23..64af52cbedb 100644
--- a/gcc/ada/raise-gcc.c
+++ b/gcc/ada/raise-gcc.c
@@ -663,16 +663,13 @@ db_action_for (action_descriptor *action, _Unwind_Context *uw_context)
return;
}
-
/* Search the call_site_table of REGION for an entry appropriate for the
- UW_CONTEXT's ip. If one is found, store the associated landing_pad and
- action_table entry, and set the ACTION kind to unknown for further
- analysis. Otherwise, set the ACTION kind to nothing.
+ UW_CONTEXT's IP. If one is found, store the associated landing_pad
+ and action_table entry, and set the ACTION kind to unknown for further
+ analysis. Otherwise, set the ACTION kind to nothing.
There are two variants of this routine, depending on the underlying
- mechanism (dwarf/sjlj), which account for differences in the tables
- organization.
-*/
+ mechanism (DWARF/SJLJ), which account for differences in the tables. */
#ifdef __USING_SJLJ_EXCEPTIONS__
@@ -683,14 +680,13 @@ get_call_site_action_for (_Unwind_Context *uw_context,
region_descriptor *region,
action_descriptor *action)
{
- _Unwind_Ptr call_site
- = _Unwind_GetIP (uw_context) - 1;
/* Subtract 1 because GetIP returns the actual call_site value + 1. */
+ _Unwind_Ptr call_site = _Unwind_GetIP (uw_context) - 1;
/* call_site is a direct index into the call-site table, with two special
- values : -1 for no-action and 0 for "terminate". The latter should never
- show up for Ada. To test for the former, beware that _Unwind_Ptr might be
- unsigned. */
+ values : -1 for no-action and 0 for "terminate". The latter should never
+ show up for Ada. To test for the former, beware that _Unwind_Ptr might
+ be unsigned. */
if ((int)call_site < 0)
{
@@ -712,18 +708,17 @@ get_call_site_action_for (_Unwind_Context *uw_context,
action->kind = unknown;
/* We have a direct index into the call-site table, but this table is
- made of leb128 values, the encoding length of which is variable. We
+ made of leb128 values, the encoding length of which is variable. We
can't merely compute an offset from the index, then, but have to read
all the entries before the one of interest. */
- const unsigned char * p = region->call_site_table;
+ const unsigned char *p = region->call_site_table;
do {
p = read_uleb128 (p, &cs_lp);
p = read_uleb128 (p, &cs_action);
} while (--call_site);
-
action->landing_pad = cs_lp + 1;
if (cs_action)
@@ -735,29 +730,26 @@ get_call_site_action_for (_Unwind_Context *uw_context,
}
}
-#else
-/* ! __USING_SJLJ_EXCEPTIONS__ */
+#else /* !__USING_SJLJ_EXCEPTIONS__ */
static void
get_call_site_action_for (_Unwind_Context *uw_context,
region_descriptor *region,
action_descriptor *action)
{
- _Unwind_Ptr ip
- = _Unwind_GetIP (uw_context) - 1;
/* Subtract 1 because GetIP yields a call return address while we are
- interested in information for the call point. This does not always yield
- the exact call instruction address but always brings the ip back within
- the corresponding region.
+ interested in information for the call point. This does not always
+ yield the exact call instruction address but always brings the IP back
+ within the corresponding region.
??? When unwinding up from a signal handler triggered by a trap on some
instruction, we usually have the faulting instruction address here and
subtracting 1 might get us into the wrong region. */
+ _Unwind_Ptr ip = _Unwind_GetIP (uw_context) - 1;
- const unsigned char * p
- = region->call_site_table;
+ const unsigned char *p = region->call_site_table;
- /* Unless we are able to determine otherwise ... */
+ /* Unless we are able to determine otherwise... */
action->kind = nothing;
db (DB_CSITE, "\n");
@@ -778,7 +770,7 @@ get_call_site_action_for (_Unwind_Context *uw_context,
region->base+cs_start, cs_start, cs_len,
region->lp_base+cs_lp, cs_lp);
- /* The table is sorted, so if we've passed the ip, stop. */
+ /* The table is sorted, so if we've passed the IP, stop. */
if (ip < region->base + cs_start)
break;
@@ -807,7 +799,7 @@ get_call_site_action_for (_Unwind_Context *uw_context,
db (DB_CSITE, "---\n");
}
-#endif
+#endif /* __USING_SJLJ_EXCEPTIONS__ */
/* With CHOICE an exception choice representing an "exception - when"
argument, and PROPAGATED_EXCEPTION a pointer to the currently propagated