diff options
author | Iain Sandoe <iains@gcc.gnu.org> | 2011-10-28 11:59:07 +0000 |
---|---|---|
committer | Iain Sandoe <iains@gcc.gnu.org> | 2011-10-28 11:59:07 +0000 |
commit | a53f35231396649b873de60f93562e322623c743 (patch) | |
tree | 428a8593256af461200fed6bef5ec3aeecbfef6b /gcc/ada/init.c | |
parent | 4a6b297c988434269153703b27fff9e9037894fb (diff) | |
download | gcc-a53f35231396649b873de60f93562e322623c743.zip gcc-a53f35231396649b873de60f93562e322623c743.tar.gz gcc-a53f35231396649b873de60f93562e322623c743.tar.bz2 |
re PR target/50678 (FAIL: c52104y on x86_64-apple-darwin10)
ada:
PR target/50678
* init.c (Darwin/__gnat_error_handler): Apply a work-around to the
bug [filed as radar #10302855], which is inconsistent unwind data
for sigtramp.
Co-Authored-By: Eric Botcazou <ebotcazou@adacore.com>
From-SVN: r180613
Diffstat (limited to 'gcc/ada/init.c')
-rw-r--r-- | gcc/ada/init.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/ada/init.c b/gcc/ada/init.c index 9ac475d..8d2f4e1 100644 --- a/gcc/ada/init.c +++ b/gcc/ada/init.c @@ -2287,6 +2287,16 @@ __gnat_error_handler (int sig, siginfo_t *si, 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 + the sigtramp have different ideas about register numbering (causing rbx + 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 switch (sig) { |