Commit a53f3523 by Iain Sandoe

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
parent 4a6b297c
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> 2011-10-28 Eric Botcazou <ebotcazou@adacore.com>
PR ada/50842 PR ada/50842
......
...@@ -2287,6 +2287,16 @@ __gnat_error_handler (int sig, siginfo_t *si, void *ucontext ATTRIBUTE_UNUSED) ...@@ -2287,6 +2287,16 @@ __gnat_error_handler (int sig, siginfo_t *si, void *ucontext ATTRIBUTE_UNUSED)
{ {
struct Exception_Data *exception; struct Exception_Data *exception;
const char *msg; 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) switch (sig)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment