mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-14 16:00:44 +02:00
Windows: Skip state reconstruction on exceptions in dispatcher
The dispatcher always spills register state before issuing faulting instructions
This commit is contained in:
1 parent
bdae4f6915
commit
b6fe4cd6dd
2 files changed
+12
-3
No files matched your search
@@ -131,9 +131,14 @@ uint64_t GetWowTEB(void* TEB) {
|
||||
*reinterpret_cast<LONG*>(reinterpret_cast<uintptr_t>(TEB) + WowTEBOffsetMemberOffset) + reinterpret_cast<uint64_t>(TEB));
|
||||
}
|
||||
|
||||
bool IsDispatcherAddress(uint64_t Address) {
|
||||
const auto& Config = SignalDelegator->GetConfig();
|
||||
return Address >= Config.DispatcherBegin && Address < Config.DispatcherEnd;
|
||||
}
|
||||
|
||||
bool IsAddressInJit(uint64_t Address) {
|
||||
const auto& Config = SignalDelegator->GetConfig();
|
||||
if (Address >= Config.DispatcherBegin && Address < Config.DispatcherEnd) {
|
||||
if (IsDispatcherAddress(Address)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -272,7 +277,9 @@ void ReconstructThreadState(CONTEXT* Context) {
|
||||
}
|
||||
|
||||
WOW64_CONTEXT ReconstructWowContext(CONTEXT* Context) {
|
||||
ReconstructThreadState(Context);
|
||||
if (!IsDispatcherAddress(Context->Pc)) {
|
||||
ReconstructThreadState(Context);
|
||||
}
|
||||
|
||||
WOW64_CONTEXT WowContext {
|
||||
.ContextFlags = WOW64_CONTEXT_ALL,
|
||||
|
||||
Reference in new issue
Block a user