Fix compilation on not so common platforms.
The patch was originally created by Jamie Bennett <jb@canonical.com> for Ubuntu. It was later improved by Adrian Knoth for Debian. LP: #556351
This commit is contained in:
parent
2af423a7d8
commit
1e746c65bb
12
sigsegv.c
12
sigsegv.c
|
@ -91,8 +91,18 @@ static void signal_segv(int signum, siginfo_t* info, void*ptr) {
|
|||
a2j_error("info.si_errno = %d", info->si_errno);
|
||||
a2j_error("info.si_code = %d (%s)", info->si_code, si_codes[info->si_code]);
|
||||
a2j_error("info.si_addr = %p", info->si_addr);
|
||||
#if !defined(__alpha__) && !defined(__ia64__) && !defined(__FreeBSD_kernel__) && !defined(__arm__) && !defined(__hppa__) && !defined(__sh__)
|
||||
for(i = 0; i < NGREG; i++)
|
||||
a2j_error("reg[%02d] = 0x" REGFORMAT, i, ucontext->uc_mcontext.gregs[i]);
|
||||
a2j_error("reg[%02d] = 0x" REGFORMAT, i,
|
||||
#if defined(__powerpc__)
|
||||
ucontext->uc_mcontext.uc_regs[i]
|
||||
#elif defined(__sparc__) && defined(__arch64__)
|
||||
ucontext->uc_mcontext.mc_gregs[i]
|
||||
#else
|
||||
ucontext->uc_mcontext.gregs[i]
|
||||
#endif
|
||||
);
|
||||
#endif /* alpha, ia64, kFreeBSD, arm, hppa */
|
||||
|
||||
#if defined(SIGSEGV_STACK_X86) || defined(SIGSEGV_STACK_IA64)
|
||||
# if defined(SIGSEGV_STACK_IA64)
|
||||
|
|
Loading…
Reference in New Issue