ntdll: Remove the raise_exception helper function on x86-64.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
ac6244b55a
commit
1522280e68
|
@ -2574,11 +2574,9 @@ static NTSTATUS call_stack_handlers( EXCEPTION_RECORD *rec, CONTEXT *orig_contex
|
|||
|
||||
|
||||
/*******************************************************************
|
||||
* raise_exception
|
||||
*
|
||||
* Implementation of NtRaiseException.
|
||||
* NtRaiseException (NTDLL.@)
|
||||
*/
|
||||
static NTSTATUS raise_exception( EXCEPTION_RECORD *rec, CONTEXT *context, BOOL first_chance )
|
||||
NTSTATUS WINAPI NtRaiseException( EXCEPTION_RECORD *rec, CONTEXT *context, BOOL first_chance )
|
||||
{
|
||||
NTSTATUS status;
|
||||
|
||||
|
@ -2614,17 +2612,15 @@ static NTSTATUS raise_exception( EXCEPTION_RECORD *rec, CONTEXT *context, BOOL f
|
|||
context->R12, context->R13, context->R14, context->R15 );
|
||||
}
|
||||
status = send_debug_event( rec, TRUE, context );
|
||||
if (status == DBG_CONTINUE || status == DBG_EXCEPTION_HANDLED)
|
||||
return STATUS_SUCCESS;
|
||||
if (status == DBG_CONTINUE || status == DBG_EXCEPTION_HANDLED) goto done;
|
||||
|
||||
/* fix up instruction pointer in context for EXCEPTION_BREAKPOINT */
|
||||
if (rec->ExceptionCode == EXCEPTION_BREAKPOINT) context->Rip--;
|
||||
|
||||
if (call_vectored_handlers( rec, context ) == EXCEPTION_CONTINUE_EXECUTION)
|
||||
return STATUS_SUCCESS;
|
||||
if (call_vectored_handlers( rec, context ) == EXCEPTION_CONTINUE_EXECUTION) goto done;
|
||||
|
||||
if ((status = call_stack_handlers( rec, context )) != STATUS_UNHANDLED_EXCEPTION)
|
||||
return status;
|
||||
if ((status = call_stack_handlers( rec, context )) == STATUS_SUCCESS) goto done;
|
||||
if (status != STATUS_UNHANDLED_EXCEPTION) return status;
|
||||
}
|
||||
|
||||
/* last chance exception */
|
||||
|
@ -2641,7 +2637,9 @@ static NTSTATUS raise_exception( EXCEPTION_RECORD *rec, CONTEXT *context, BOOL f
|
|||
rec->ExceptionCode, rec->ExceptionFlags, rec->ExceptionAddress );
|
||||
NtTerminateProcess( NtCurrentProcess(), rec->ExceptionCode );
|
||||
}
|
||||
return STATUS_SUCCESS;
|
||||
|
||||
done:
|
||||
return NtSetContextThread( GetCurrentThread(), context );
|
||||
}
|
||||
|
||||
|
||||
|
@ -4027,17 +4025,6 @@ EXCEPTION_DISPOSITION WINAPI __C_specific_handler( EXCEPTION_RECORD *rec,
|
|||
}
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
* NtRaiseException (NTDLL.@)
|
||||
*/
|
||||
NTSTATUS WINAPI NtRaiseException( EXCEPTION_RECORD *rec, CONTEXT *context, BOOL first_chance )
|
||||
{
|
||||
NTSTATUS status = raise_exception( rec, context, first_chance );
|
||||
if (status == STATUS_SUCCESS) NtSetContextThread( GetCurrentThread(), context );
|
||||
return status;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* RtlRaiseException (NTDLL.@)
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue