aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/init.c
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2015-11-25 16:09:38 +0100
committerArnaud Charlet <charlet@gcc.gnu.org>2015-11-25 16:09:38 +0100
commitccaca7e9f03080b8707a978a51097858a64654e9 (patch)
tree7fe5d12eb1558a1934d3e8456a183450acbc1e7a /gcc/ada/init.c
parentd75a7b1f3283c5c020aa51bf019b2d1e9548765e (diff)
downloadgcc-ccaca7e9f03080b8707a978a51097858a64654e9.zip
gcc-ccaca7e9f03080b8707a978a51097858a64654e9.tar.gz
gcc-ccaca7e9f03080b8707a978a51097858a64654e9.tar.bz2
[multiple changes]
2015-11-25 Jerome Lambourg <lambourg@adacore.com> * init.c: Enable the signal trampoline on x86_64-vx7 * sigtramp-vxworks-target.inc: Implement the signal trampoline for x86_64 * tracebak.c: Remove the hook to use the generic unwinder on x86_64-vx7. 2015-11-25 Vincent Celier <celier@adacore.com> * gnatcmd.adb: When "gnat name -P" is called, invoke gprname directly if available. From-SVN: r230875
Diffstat (limited to 'gcc/ada/init.c')
-rw-r--r--gcc/ada/init.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/gcc/ada/init.c b/gcc/ada/init.c
index 57b02a1..06e366d 100644
--- a/gcc/ada/init.c
+++ b/gcc/ada/init.c
@@ -1974,7 +1974,7 @@ __gnat_error_handler (int sig, siginfo_t *si, void *sc)
sigdelset (&mask, sig);
sigprocmask (SIG_SETMASK, &mask, NULL);
-#if defined (__ARMEL__) || defined (__PPC__) || (defined (__i386__) && _WRS_VXWORKS_MAJOR < 7)
+#if defined (__ARMEL__) || defined (__PPC__) || defined (__i386__) || defined (__x86_64__)
/* On certain targets, kernel mode, we process signals through a Call Frame
Info trampoline, voiding the need for myriads of fallback_frame_state
variants in the ZCX runtime. We have no simple way to distinguish ZCX
@@ -1982,19 +1982,23 @@ __gnat_error_handler (int sig, siginfo_t *si, void *sc)
necessary. This only incurs a few extra instructions and a tiny
amount of extra stack usage. */
-#if defined (__i386__) && !defined (VTHREADS)
+#ifdef HAVE_GNAT_ADJUST_CONTEXT_FOR_RAISE
+ /* We need to sometimes to adjust the PC in case of signals so that it
+ doesn't reference the exception that actually raised the signal but the
+ instruction before it. */
+ __gnat_adjust_context_for_raise (sig, sc);
+#endif
+
+#if defined (__i386__) && !defined (VTHREADS) && (__WRS_VXWORKS_MAJOR < 7)
/* On x86, the vxsim signal context is subtly different and is processeed
- by a handler compiled especially for vxsim. */
+ by a handler compiled especially for vxsim.
+ Vxsim is not supported anymore on our vxworks-7 port. */
if (is_vxsim)
__gnat_vxsim_error_handler (sig, si, sc);
#endif
-#ifdef HAVE_GNAT_ADJUST_CONTEXT_FOR_RAISE
- __gnat_adjust_context_for_raise (sig, sc);
-#endif
-
-#include "sigtramp.h"
+# include "sigtramp.h"
__gnat_sigtramp (sig, (void *)si, (void *)sc,
(__sigtramphandler_t *)&__gnat_map_signal);