ntdll: Use NtContinue() to restore context after an exception.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2020-06-06 15:17:07 +02:00
parent 95e2d05e5d
commit 7f28a1c521
5 changed files with 11 additions and 12 deletions

View File

@ -528,10 +528,10 @@ NTSTATUS WINAPI KiUserExceptionDispatcher( EXCEPTION_RECORD *rec, CONTEXT *conte
}
if (call_vectored_handlers( rec, context ) == EXCEPTION_CONTINUE_EXECUTION)
NtSetContextThread( GetCurrentThread(), context );
NtContinue( context, FALSE );
if ((status = call_stack_handlers( rec, context )) == STATUS_SUCCESS)
NtSetContextThread( GetCurrentThread(), context );
NtContinue( context, FALSE );
if (status != STATUS_UNHANDLED_EXCEPTION) RtlRaiseStatus( status );
return NtRaiseException( rec, context, FALSE );

View File

@ -783,10 +783,10 @@ NTSTATUS WINAPI KiUserExceptionDispatcher( EXCEPTION_RECORD *rec, CONTEXT *conte
}
if (call_vectored_handlers( rec, context ) == EXCEPTION_CONTINUE_EXECUTION)
NtSetContextThread( GetCurrentThread(), context );
NtContinue( context, FALSE );
if ((status = call_function_handlers( rec, context )) == STATUS_SUCCESS)
NtSetContextThread( GetCurrentThread(), context );
NtContinue( context, FALSE );
if (status != STATUS_UNHANDLED_EXCEPTION) RtlRaiseStatus( status );
return NtRaiseException( rec, context, FALSE );

View File

@ -757,10 +757,10 @@ NTSTATUS WINAPI KiUserExceptionDispatcher( EXCEPTION_RECORD *rec, CONTEXT *conte
if (rec->ExceptionCode == EXCEPTION_BREAKPOINT) context->Eip--;
if (call_vectored_handlers( rec, context ) == EXCEPTION_CONTINUE_EXECUTION)
NtSetContextThread( GetCurrentThread(), context );
NtContinue( context, FALSE );
if ((status = call_stack_handlers( rec, context )) == STATUS_SUCCESS)
NtSetContextThread( GetCurrentThread(), context );
NtContinue( context, FALSE );
if (status != STATUS_UNHANDLED_EXCEPTION) RtlRaiseStatus( status );
return NtRaiseException( rec, context, FALSE );
@ -1978,8 +1978,7 @@ void WINAPI DECLSPEC_HIDDEN __regs_RtlUnwind( EXCEPTION_REGISTRATION_RECORD* pEn
}
frame = __wine_pop_frame( frame );
}
NtSetContextThread( GetCurrentThread(), context );
NtContinue( context, FALSE );
}
__ASM_STDCALL_FUNC( RtlUnwind, 16,
"pushl %ebp\n\t"

View File

@ -372,10 +372,10 @@ NTSTATUS WINAPI KiUserExceptionDispatcher( EXCEPTION_RECORD *rec, CONTEXT *conte
}
if (call_vectored_handlers( rec, context ) == EXCEPTION_CONTINUE_EXECUTION)
NtSetContextThread( GetCurrentThread(), context );
NtContinue( context, FALSE );
if ((status = call_stack_handlers( rec, context )) == STATUS_SUCCESS)
NtSetContextThread( GetCurrentThread(), context );
NtContinue( context, FALSE );
if (status != STATUS_UNHANDLED_EXCEPTION) RtlRaiseStatus( status );
return NtRaiseException( rec, context, FALSE );

View File

@ -2264,10 +2264,10 @@ NTSTATUS WINAPI KiUserExceptionDispatcher( EXCEPTION_RECORD *rec, CONTEXT *conte
if (rec->ExceptionCode == EXCEPTION_BREAKPOINT) context->Rip--;
if (call_vectored_handlers( rec, context ) == EXCEPTION_CONTINUE_EXECUTION)
NtSetContextThread( GetCurrentThread(), context );
NtContinue( context, FALSE );
if ((status = call_stack_handlers( rec, context )) == STATUS_SUCCESS)
NtSetContextThread( GetCurrentThread(), context );
NtContinue( context, FALSE );
if (status != STATUS_UNHANDLED_EXCEPTION) RtlRaiseStatus( status );
return NtRaiseException( rec, context, FALSE );