mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-02 15:28:03 +00:00
ntdll: Always call Wow64PrepareForException when dispatching an exception.
This commit is contained in:
parent
4d217cb274
commit
eccf92996c
3 changed files with 6 additions and 1 deletions
|
@ -494,6 +494,8 @@ NTSTATUS WINAPI KiUserExceptionDispatcher( EXCEPTION_RECORD *rec, CONTEXT *conte
|
|||
NTSTATUS status;
|
||||
DWORD c;
|
||||
|
||||
if (pWow64PrepareForException) pWow64PrepareForException( rec, context );
|
||||
|
||||
TRACE( "code=%lx flags=%lx addr=%p pc=%016I64x\n",
|
||||
rec->ExceptionCode, rec->ExceptionFlags, rec->ExceptionAddress, context->Pc );
|
||||
for (c = 0; c < rec->NumberParameters; c++)
|
||||
|
|
|
@ -508,6 +508,8 @@ NTSTATUS WINAPI dispatch_exception( EXCEPTION_RECORD *rec, CONTEXT *context )
|
|||
NTSTATUS status;
|
||||
DWORD c;
|
||||
|
||||
if (pWow64PrepareForException) pWow64PrepareForException( rec, context );
|
||||
|
||||
TRACE_(seh)( "code=%lx flags=%lx addr=%p ip=%Ix\n",
|
||||
rec->ExceptionCode, rec->ExceptionFlags, rec->ExceptionAddress, context->Rip );
|
||||
for (c = 0; c < min( EXCEPTION_MAXIMUM_PARAMETERS, rec->NumberParameters ); c++)
|
||||
|
@ -584,7 +586,6 @@ NTSTATUS WINAPI dispatch_wow_exception( EXCEPTION_RECORD *rec_ptr, CONTEXT *cont
|
|||
RtlInitializeExtendedContext( buffer, context_ptr->ContextFlags, &context_ex );
|
||||
context = RtlLocateLegacyContext( context_ex, NULL );
|
||||
RtlCopyContext( context, context_ptr->ContextFlags, context_ptr );
|
||||
pWow64PrepareForException( &rec, context );
|
||||
return dispatch_exception( &rec, context );
|
||||
}
|
||||
|
||||
|
|
|
@ -375,6 +375,8 @@ NTSTATUS WINAPI BTCpuResetToConsistentState( EXCEPTION_POINTERS *ptrs )
|
|||
CONTEXT *context = ptrs->ContextRecord;
|
||||
I386_CONTEXT wow_context;
|
||||
|
||||
if (context->SegCs == cs64_sel) return STATUS_SUCCESS; /* exception in 64-bit code, nothing to do */
|
||||
|
||||
copy_context_64to32( &wow_context, CONTEXT_I386_ALL, context );
|
||||
wow_context.EFlags &= ~(0x100|0x40000);
|
||||
BTCpuSetContext( GetCurrentThread(), GetCurrentProcess(), NULL, &wow_context );
|
||||
|
|
Loading…
Reference in a new issue