diff options
author | iains <iains@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-10-28 11:59:07 +0000 |
---|---|---|
committer | iains <iains@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-10-28 11:59:07 +0000 |
commit | d6e57d851bcfe51a361ae8fe423dbab6c0add539 (patch) | |
tree | 428a8593256af461200fed6bef5ec3aeecbfef6b /gcc/ada | |
parent | c8773b4ecf3192da7dd9e3de8b1091275537e32a (diff) | |
download | gcc-d6e57d851bcfe51a361ae8fe423dbab6c0add539.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@180613 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada')
-rw-r--r-- | gcc/ada/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/ada/init.c | 10 |
2 files changed, 18 insertions, 0 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index bacb37129b6..11d0209738b 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,11 @@ +2011-10-28 Iain Sandoe <iains@gcc.gnu.org> + Eric Botcazou <ebotcazou@adacore.com> + + 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. + 2011-10-28 Eric Botcazou <ebotcazou@adacore.com> PR ada/50842 diff --git a/gcc/ada/init.c b/gcc/ada/init.c index 9ac475da3c5..8d2f4e1f235 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) { |