diff options
author | Iain Sandoe <iains@gcc.gnu.org> | 2011-11-18 13:19:25 +0000 |
---|---|---|
committer | Iain Sandoe <iains@gcc.gnu.org> | 2011-11-18 13:19:25 +0000 |
commit | 590175d22876c396b55c3c3cb38bd70a7c4b790e (patch) | |
tree | f4518b15443807b17e2fc5b69306e577b2c3b764 /gcc | |
parent | 72f1c34bd49cceca3dc1f8529161353b1aa89c41 (diff) | |
download | gcc-590175d22876c396b55c3c3cb38bd70a7c4b790e.zip gcc-590175d22876c396b55c3c3cb38bd70a7c4b790e.tar.gz gcc-590175d22876c396b55c3c3cb38bd70a7c4b790e.tar.bz2 |
re PR target/50678 (FAIL: c52104y on x86_64-apple-darwin10)
gcc/ada:
PR target/50678
* init.c (__gnat_error_handler) [Darwin]: Move work-around to the
bug filed as radar #10302855 from __gnat_error_handler ...
... to (__gnat_adjust_context_for_raise) [Darwin]: New.
(HAVE_GNAT_ADJUST_CONTEXT_FOR_RAISE) [Darwin]: Define.
(__gnat_error_handler) [Darwin]: Use __gnat_adjust_context_for_raise.
From-SVN: r181474
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/ada/init.c | 19 |
2 files changed, 24 insertions, 4 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 8da84db..e196ffe 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,12 @@ +2011-11-18 Iain Sandoe <iains@gcc.gnu.org> + + PR target/50678 + * init.c (__gnat_error_handler) [Darwin]: Move work-around to the + bug filed as radar #10302855 from __gnat_error_handler ... + ... to (__gnat_adjust_context_for_raise) [Darwin]: New. + (HAVE_GNAT_ADJUST_CONTEXT_FOR_RAISE) [Darwin]: Define. + (__gnat_error_handler) [Darwin]: Use __gnat_adjust_context_for_raise. + 2011-11-18 Tristan Gingold <gingold@adacore.com> Iain Sandoe <iains@gcc.gnu.org> diff --git a/gcc/ada/init.c b/gcc/ada/init.c index 8d2f4e1..b6d6e6a 100644 --- a/gcc/ada/init.c +++ b/gcc/ada/init.c @@ -2282,11 +2282,12 @@ __gnat_is_stack_guard (mach_vm_address_t addr) return 0; } -static void -__gnat_error_handler (int sig, siginfo_t *si, void *ucontext ATTRIBUTE_UNUSED) +#define HAVE_GNAT_ADJUST_CONTEXT_FOR_RAISE + +void +__gnat_adjust_context_for_raise (int signo ATTRIBUTE_UNUSED, + void *ucontext ATTRIBUTE_UNUSED) { - struct Exception_Data *exception; - const char *msg; #if defined (__x86_64__) /* Work around radar #10302855/pr50678, where the unwinders (libunwind or libgcc_s depending on the system revision) and the DWARF unwind data for @@ -2294,9 +2295,19 @@ __gnat_error_handler (int sig, siginfo_t *si, void *ucontext ATTRIBUTE_UNUSED) and rdx to be transposed).. */ ucontext_t *uc = (ucontext_t *)ucontext ; unsigned long t = uc->uc_mcontext->__ss.__rbx; + uc->uc_mcontext->__ss.__rbx = uc->uc_mcontext->__ss.__rdx; uc->uc_mcontext->__ss.__rdx = t; #endif +} + +static void +__gnat_error_handler (int sig, siginfo_t *si, void *ucontext) +{ + struct Exception_Data *exception; + const char *msg; + + __gnat_adjust_context_for_raise (sig, ucontext); switch (sig) { |