ntdll: Add a wrapper to call the unhandled exception filter.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2018-10-09 14:42:30 +02:00
parent e07230ed4e
commit da60ea1c33
7 changed files with 17 additions and 6 deletions

View File

@ -306,6 +306,16 @@ ULONG WINAPI RtlRemoveVectoredExceptionHandler( PVOID handler )
}
/*******************************************************************
* call_unhandled_exception_filter
*/
LONG WINAPI call_unhandled_exception_filter( PEXCEPTION_POINTERS eptr )
{
if (!unhandled_exception_filter) return EXCEPTION_CONTINUE_SEARCH;
return unhandled_exception_filter( eptr );
}
/*************************************************************
* __wine_spec_unimplemented_stub
*

View File

@ -57,6 +57,7 @@ extern NTSTATUS context_to_server( context_t *to, const CONTEXT *from ) DECLSPEC
extern NTSTATUS context_from_server( CONTEXT *to, const context_t *from ) DECLSPEC_HIDDEN;
extern NTSTATUS set_thread_context( HANDLE handle, const context_t *context, BOOL *self ) DECLSPEC_HIDDEN;
extern NTSTATUS get_thread_context( HANDLE handle, context_t *context, unsigned int flags, BOOL *self ) DECLSPEC_HIDDEN;
extern LONG WINAPI call_unhandled_exception_filter( PEXCEPTION_POINTERS eptr ) DECLSPEC_HIDDEN;
/* debug helpers */
extern LPCSTR debugstr_us( const UNICODE_STRING *str ) DECLSPEC_HIDDEN;

View File

@ -1227,7 +1227,7 @@ static void call_thread_entry_point( LPTHREAD_START_ROUTINE entry, void *arg )
TRACE_(relay)( "\1Starting thread proc %p (arg=%p)\n", entry, arg );
RtlExitUserThread( entry( arg ));
}
__EXCEPT(unhandled_exception_filter)
__EXCEPT(call_unhandled_exception_filter)
{
NtTerminateThread( GetCurrentThread(), GetExceptionCode() );
}

View File

@ -998,7 +998,7 @@ static void WINAPI call_thread_entry_point( LPTHREAD_START_ROUTINE entry, void *
TRACE_(relay)( "\1Starting thread proc %p (arg=%p)\n", entry, arg );
RtlExitUserThread( entry( arg ));
}
__EXCEPT(unhandled_exception_filter)
__EXCEPT(call_unhandled_exception_filter)
{
NtTerminateThread( GetCurrentThread(), GetExceptionCode() );
}

View File

@ -2653,7 +2653,7 @@ void DECLSPEC_HIDDEN call_thread_func( LPTHREAD_START_ROUTINE entry, void *arg )
TRACE_(relay)( "\1Starting thread proc %p (arg=%p)\n", entry, arg );
RtlExitUserThread( call_thread_func_wrapper( entry, arg ));
}
__EXCEPT(unhandled_exception_filter)
__EXCEPT(call_unhandled_exception_filter)
{
NtTerminateThread( GetCurrentThread(), GetExceptionCode() );
}

View File

@ -648,7 +648,7 @@ static NTSTATUS call_stack_handlers( EXCEPTION_RECORD *rec, CONTEXT *context )
/* hack: call unhandled exception filter directly */
ptrs.ExceptionRecord = rec;
ptrs.ContextRecord = context;
unhandled_exception_filter( &ptrs );
call_unhandled_exception_filter( &ptrs );
return STATUS_UNHANDLED_EXCEPTION;
}
@ -1160,7 +1160,7 @@ static void WINAPI call_thread_entry_point( LPTHREAD_START_ROUTINE entry, void *
TRACE_(relay)( "\1Starting thread proc %p (arg=%p)\n", entry, arg );
RtlExitUserThread( entry( arg ));
}
__EXCEPT(unhandled_exception_filter)
__EXCEPT(call_unhandled_exception_filter)
{
NtTerminateThread( GetCurrentThread(), GetExceptionCode() );
}

View File

@ -4370,7 +4370,7 @@ static void WINAPI call_thread_func( LPTHREAD_START_ROUTINE entry, void *arg )
TRACE_(relay)( "\1Starting thread proc %p (arg=%p)\n", entry, arg );
RtlExitUserThread( entry( arg ));
}
__EXCEPT(unhandled_exception_filter)
__EXCEPT(call_unhandled_exception_filter)
{
NtTerminateThread( GetCurrentThread(), GetExceptionCode() );
}