File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -231,16 +231,24 @@ handle_fatal_signal(int signum,
231
231
void *pc = 0 ;
232
232
ucontext_t *ctx = (ucontext_t *)uctx;
233
233
234
- #ifdef __DARWIN_UNIX03
234
+ #if defined(__arm64__) && __DARWIN_OPAQUE_ARM_THREAD_STATE64
235
+ #define THREAD_STATE_MEMBER (x ) __opaque_##x
236
+ #elif __DARWIN_UNIX03
237
+ #define THREAD_STATE_MEMBER (x ) __##x
238
+ #else
239
+ #define THREAD_STATE_MEMBER (x ) x
240
+ #endif
241
+
242
+ #if __DARWIN_UNIX03
235
243
#define CTX_MEMBER (x ) __##x
236
244
#else
237
245
#define CTX_MEMBER (x ) x
238
246
#endif
239
247
240
248
#if defined(__x86_64__)
241
- pc = (void *)(ctx->uc_mcontext ->CTX_MEMBER (ss).CTX_MEMBER (rip));
249
+ pc = (void *)(ctx->uc_mcontext ->CTX_MEMBER (ss).THREAD_STATE_MEMBER (rip));
242
250
#elif defined(__arm64__)
243
- pc = (void *)(ctx->uc_mcontext ->CTX_MEMBER (ss).CTX_MEMBER (pc));
251
+ pc = (void *)(ctx->uc_mcontext ->CTX_MEMBER (ss).THREAD_STATE_MEMBER (pc));
244
252
#endif
245
253
246
254
_swift_displayCrashMessage (signum, pc);
You can’t perform that action at this time.
0 commit comments