August 14, 2020 6:55 AM, "Martin Storsjo" martin@martin.st wrote:
diff --git a/dlls/ntdll/unix/signal_arm64.c b/dlls/ntdll/unix/signal_arm64.c index cc34690f96..f1c6cdc5fa 100644 --- a/dlls/ntdll/unix/signal_arm64.c +++ b/dlls/ntdll/unix/signal_arm64.c @@ -299,7 +313,11 @@ static void save_context( CONTEXT *context, const ucontext_t *sigcontext ) context->Sp = SP_sig(sigcontext); /* Stack pointer */ context->Pc = PC_sig(sigcontext); /* Program Counter */ context->Cpsr = PSTATE_sig(sigcontext); /* Current State Register */ +#ifdef linux for (i = 0; i <= 28; i++) context->u.X[i] = REGn_sig( i, sigcontext ); +#elif defined(__APPLE__)
- for (i = 0; i <= 28; i++) context->u.X[i] = sigcontext->uc_mcontext->__ss.__x[i];
Or, you could define REGn_sig() for macOS. Then you wouldn't need a lot of these #ifdefs.
Chip