Commit eccf9299 authored by Alexandre Julliard's avatar Alexandre Julliard

ntdll: Always call Wow64PrepareForException when dispatching an exception.

parent 4d217cb2
......@@ -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 );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment