WOW64: Set the software CPU area flag

This is required for wow64.dll to setup the cross-process queue
that is used to pass through e.g. memory unmap events.
This commit is contained in:
Billy Laws committed 2024-11-18 16:18:31 +00:00
1 parent e675f4241a
commit 830bd347c5
4 files changed
+27 -4

No files matched your search

+3
View File
@@ -449,6 +449,9 @@ static void RethrowGuestException(const EXCEPTION_RECORD& Rec, ARM64_NT_CONTEXT&
Args->Rec = FEX::Windows::HandleGuestException(Fault, Rec, Args->Context.Pc, Args->Context.X8);
if (Args->Rec.ExceptionCode == EXCEPTION_SINGLE_STEP) {
Args->Context.Cpsr &= ~(1 << 21); // PSTATE.SS
} else if (Args->Rec.ExceptionCode == EXCEPTION_BREAKPOINT) {
// INT3 will set RIP to the instruction following it, undo this (any edge cases with multibyte instructions that trigger breakpoints are bugs present in Windows also)
Args->Context.Pc -= 1;
}
Context.Sp = reinterpret_cast<uint64_t>(Args);