Merge pull request #116 from atsampson/master

Use ucontext_t instead of struct ucontext
This commit is contained in:
asvitkine 2017-08-09 21:58:11 -04:00 committed by GitHub
commit 5bbdb4f864

View File

@ -342,12 +342,12 @@ static void powerpc_decode_instruction(instruction_t *instruction, unsigned int
#define SIGSEGV_REGISTER_FILE (unsigned long *)&SIGSEGV_CONTEXT_REGS->nip, (unsigned long *)(SIGSEGV_CONTEXT_REGS->gpr) #define SIGSEGV_REGISTER_FILE (unsigned long *)&SIGSEGV_CONTEXT_REGS->nip, (unsigned long *)(SIGSEGV_CONTEXT_REGS->gpr)
#define SIGSEGV_SKIP_INSTRUCTION powerpc_skip_instruction #define SIGSEGV_SKIP_INSTRUCTION powerpc_skip_instruction
#elif (defined(arm) || defined(__arm__)) #elif (defined(arm) || defined(__arm__))
#define SIGSEGV_CONTEXT_REGS (((struct ucontext *)scp)->uc_mcontext) #define SIGSEGV_CONTEXT_REGS (((ucontext_t *)scp)->uc_mcontext)
#define SIGSEGV_FAULT_INSTRUCTION (SIGSEGV_CONTEXT_REGS.arm_pc) #define SIGSEGV_FAULT_INSTRUCTION (SIGSEGV_CONTEXT_REGS.arm_pc)
#define SIGSEGV_REGISTER_FILE (&SIGSEGV_CONTEXT_REGS.arm_r0) #define SIGSEGV_REGISTER_FILE (&SIGSEGV_CONTEXT_REGS.arm_r0)
#define SIGSEGV_SKIP_INSTRUCTION arm_skip_instruction #define SIGSEGV_SKIP_INSTRUCTION arm_skip_instruction
#elif (defined(mips) || defined(__mips__)) #elif (defined(mips) || defined(__mips__))
#define SIGSEGV_CONTEXT_REGS (((struct ucontext *)scp)->uc_mcontext) #define SIGSEGV_CONTEXT_REGS (((ucontext_t *)scp)->uc_mcontext)
#define SIGSEGV_FAULT_INSTRUCTION (SIGSEGV_CONTEXT_REGS.pc) #define SIGSEGV_FAULT_INSTRUCTION (SIGSEGV_CONTEXT_REGS.pc)
#define SIGSEGV_REGISTER_FILE &SIGSEGV_CONTEXT_REGS.pc, &SIGSEGV_CONTEXT_REGS.gregs[0] #define SIGSEGV_REGISTER_FILE &SIGSEGV_CONTEXT_REGS.pc, &SIGSEGV_CONTEXT_REGS.gregs[0]
#define SIGSEGV_SKIP_INSTRUCTION mips_skip_instruction #define SIGSEGV_SKIP_INSTRUCTION mips_skip_instruction