1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-06-17 07:17:06 +01:00

BG/Q compatibility fix

This commit is contained in:
Antonin Portelli
2016-02-23 15:57:38 +00:00
parent 19526d09c2
commit 497e7e4c53
8 changed files with 314 additions and 2504 deletions

View File

@ -289,14 +289,13 @@ void Grid_sa_signal_handler(int sig,siginfo_t *si,void * ptr)
printf(" code %d\n",si->si_code);
// Linux/Posix
#ifdef __linux__
#ifdef __linux__
// And x86 64bit
ucontext_t * uc= (ucontext_t *)ptr;
#ifdef __x86_64__
ucontext_t * uc= (ucontext_t *)ptr;
struct sigcontext *sc = (struct sigcontext *)&uc->uc_mcontext;
printf(" instruction %llx\n",(unsigned long long)sc->rip);
#define REG(A) printf(" %s %lx\n",#A,sc-> A);
REG(rdi);
REG(rsi);
REG(rbp);
@ -316,6 +315,7 @@ void Grid_sa_signal_handler(int sig,siginfo_t *si,void * ptr)
REG(r13);
REG(r14);
REG(r15);
#endif
#endif
BACKTRACE();
exit(0);