Merge pull request #11340 from merryhime/USE_SIGACTION_ON_APPLE

MachineContext: Fix USE_SIGACTION_ON_APPLE on arm64
This commit is contained in:
JosJuice 2022-12-11 20:12:18 +01:00 committed by GitHub
commit fdd5190b4c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 0 deletions

View File

@ -78,6 +78,7 @@ typedef arm_thread_state64_t SContext;
#elif defined(__APPLE__)
#include <signal.h>
typedef _STRUCT_MCONTEXT64 SContext;
#if _M_X86_64
#define CTX_RAX __ss.__rax
#define CTX_RBX __ss.__rbx
#define CTX_RCX __ss.__rcx
@ -95,6 +96,14 @@ typedef _STRUCT_MCONTEXT64 SContext;
#define CTX_R14 __ss.__r14
#define CTX_R15 __ss.__r15
#define CTX_RIP __ss.__rip
#elif _M_ARM_64
#define CTX_REG(x) __ss.__x[x]
#define CTX_LR __ss.__lr
#define CTX_SP __ss.__sp
#define CTX_PC __ss.__pc
#else
#error No context definition for architecture
#endif
#elif defined(__linux__)
#include <signal.h>