summaryrefslogtreecommitdiffstats
path: root/gcc
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2008-08-22 12:41:18 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2008-08-22 12:41:18 +0000
commitbf1a7a9ccab8ee9dae051a2b13d5de51892dd1d4 (patch)
tree6d16dd0e5e2d1e6489a3550cab5cbaf3e60afcf4 /gcc
parent9cd35dc303e447b70bef00791ab51faf7f58e122 (diff)
downloadppe42-gcc-bf1a7a9ccab8ee9dae051a2b13d5de51892dd1d4.tar.gz
ppe42-gcc-bf1a7a9ccab8ee9dae051a2b13d5de51892dd1d4.zip
2008-08-22 Eric Botcazou <ebotcazou@adacore.com>
* init.c: adjust EH support code on Alpha/Tru64 as well. * raise-gcc.c: Add back a couple of comments. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@139446 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/init.c30
-rw-r--r--gcc/ada/raise-gcc.c6
2 files changed, 7 insertions, 29 deletions
diff --git a/gcc/ada/init.c b/gcc/ada/init.c
index fcf3af7dc4f..79655931b37 100644
--- a/gcc/ada/init.c
+++ b/gcc/ada/init.c
@@ -291,30 +291,6 @@ extern char *__gnat_get_code_loc (struct sigcontext *);
extern void __gnat_set_code_loc (struct sigcontext *, char *);
extern size_t __gnat_machine_state_length (void);
-/* __gnat_adjust_context_for_raise - see comments along with the default
- version later in this file. */
-
-#define HAVE_GNAT_ADJUST_CONTEXT_FOR_RAISE
-
-void
-__gnat_adjust_context_for_raise (int signo, void *context)
-{
- struct sigcontext * sigcontext = (struct sigcontext *) context;
-
- /* The fallback code fetches the faulting insn address from sc_pc, so
- adjust that when need be. For SIGFPE, the required adjustment depends
- on the trap shadow situation (see man ieee). */
- if (signo == SIGFPE)
- {
- /* ??? We never adjust here, considering that sc_pc always
- designates the instruction following the one which trapped.
- This is not necessarily true but corresponds to what we have
- always observed. */
- }
- else
- sigcontext->sc_pc ++;
-}
-
static void
__gnat_error_handler
(int sig, siginfo_t *sip, struct sigcontext *context)
@@ -323,10 +299,6 @@ __gnat_error_handler
static int recurse = 0;
const char *msg;
- /* Adjusting is required for every fault context, so adjust for this one
- now, before we possibly trigger a recursive fault below. */
- __gnat_adjust_context_for_raise (sig, context);
-
/* If this was an explicit signal from a "kill", just resignal it. */
if (SI_FROMUSER (sip))
{
@@ -2104,7 +2076,7 @@ __gnat_adjust_context_for_raise (int signo ATTRIBUTE_UNUSED,
{
/* We used to compensate here for the raised from call vs raised from signal
exception discrepancy with the GCC ZCX scheme, but this is now dealt with
- generically (except for Alpha and IA-64), see PR other/26208.
+ generically (except for the IA-64), see GCC PR other/26208.
*** Call vs signal exception discrepancy with GCC ZCX scheme ***
diff --git a/gcc/ada/raise-gcc.c b/gcc/ada/raise-gcc.c
index 8b3433b3a89..434213b7d89 100644
--- a/gcc/ada/raise-gcc.c
+++ b/gcc/ada/raise-gcc.c
@@ -694,6 +694,8 @@ get_call_site_action_for (_Unwind_Context *uw_context,
#else
_Unwind_Ptr call_site = _Unwind_GetIP (uw_context);
#endif
+ /* Subtract 1 if necessary because GetIPInfo returns the actual call site
+ value + 1 in this case. */
if (!ip_before_insn)
call_site--;
@@ -758,6 +760,10 @@ get_call_site_action_for (_Unwind_Context *uw_context,
#else
_Unwind_Ptr ip = _Unwind_GetIP (uw_context);
#endif
+ /* Subtract 1 if necessary because GetIPInfo yields a call return address
+ in this case, 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. */
if (!ip_before_insn)
ip--;
OpenPOWER on IntegriCloud