57 |
|
#define SIGSEGV_FAULT_HANDLER_ARGLIST int sig, siginfo_t *sip, void *scp |
58 |
|
#define SIGSEGV_FAULT_ADDRESS sip->si_addr |
59 |
|
#if defined(__linux__) |
60 |
+ |
#if (defined(i386) || defined(__i386__)) |
61 |
+ |
#include <sys/ucontext.h> |
62 |
+ |
#define SIGSEGV_FAULT_INSTRUCTION (((ucontext_t *)scp)->uc_mcontext.gregs[14]) /* should use REG_EIP instead */ |
63 |
+ |
#endif |
64 |
|
#if (defined(ia64) || defined(__ia64__)) |
65 |
|
#define SIGSEGV_FAULT_INSTRUCTION (((struct sigcontext *)scp)->sc_ip & ~0x3ULL) /* slot number is in bits 0 and 1 */ |
66 |
|
#endif |