Merge pull request #11340 from merryhime/USE_SIGACTION_ON_APPLE
MachineContext: Fix USE_SIGACTION_ON_APPLE on arm64
This commit is contained in:
commit
fdd5190b4c
|
@ -78,6 +78,7 @@ typedef arm_thread_state64_t SContext;
|
||||||
#elif defined(__APPLE__)
|
#elif defined(__APPLE__)
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
typedef _STRUCT_MCONTEXT64 SContext;
|
typedef _STRUCT_MCONTEXT64 SContext;
|
||||||
|
#if _M_X86_64
|
||||||
#define CTX_RAX __ss.__rax
|
#define CTX_RAX __ss.__rax
|
||||||
#define CTX_RBX __ss.__rbx
|
#define CTX_RBX __ss.__rbx
|
||||||
#define CTX_RCX __ss.__rcx
|
#define CTX_RCX __ss.__rcx
|
||||||
|
@ -95,6 +96,14 @@ typedef _STRUCT_MCONTEXT64 SContext;
|
||||||
#define CTX_R14 __ss.__r14
|
#define CTX_R14 __ss.__r14
|
||||||
#define CTX_R15 __ss.__r15
|
#define CTX_R15 __ss.__r15
|
||||||
#define CTX_RIP __ss.__rip
|
#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__)
|
#elif defined(__linux__)
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue