ntdll: Add a wrapper to call the unhandled exception filter.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
e07230ed4e
commit
da60ea1c33
|
@ -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
|
* __wine_spec_unimplemented_stub
|
||||||
*
|
*
|
||||||
|
|
|
@ -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 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 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 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 */
|
/* debug helpers */
|
||||||
extern LPCSTR debugstr_us( const UNICODE_STRING *str ) DECLSPEC_HIDDEN;
|
extern LPCSTR debugstr_us( const UNICODE_STRING *str ) DECLSPEC_HIDDEN;
|
||||||
|
|
|
@ -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 );
|
TRACE_(relay)( "\1Starting thread proc %p (arg=%p)\n", entry, arg );
|
||||||
RtlExitUserThread( entry( arg ));
|
RtlExitUserThread( entry( arg ));
|
||||||
}
|
}
|
||||||
__EXCEPT(unhandled_exception_filter)
|
__EXCEPT(call_unhandled_exception_filter)
|
||||||
{
|
{
|
||||||
NtTerminateThread( GetCurrentThread(), GetExceptionCode() );
|
NtTerminateThread( GetCurrentThread(), GetExceptionCode() );
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 );
|
TRACE_(relay)( "\1Starting thread proc %p (arg=%p)\n", entry, arg );
|
||||||
RtlExitUserThread( entry( arg ));
|
RtlExitUserThread( entry( arg ));
|
||||||
}
|
}
|
||||||
__EXCEPT(unhandled_exception_filter)
|
__EXCEPT(call_unhandled_exception_filter)
|
||||||
{
|
{
|
||||||
NtTerminateThread( GetCurrentThread(), GetExceptionCode() );
|
NtTerminateThread( GetCurrentThread(), GetExceptionCode() );
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 );
|
TRACE_(relay)( "\1Starting thread proc %p (arg=%p)\n", entry, arg );
|
||||||
RtlExitUserThread( call_thread_func_wrapper( entry, arg ));
|
RtlExitUserThread( call_thread_func_wrapper( entry, arg ));
|
||||||
}
|
}
|
||||||
__EXCEPT(unhandled_exception_filter)
|
__EXCEPT(call_unhandled_exception_filter)
|
||||||
{
|
{
|
||||||
NtTerminateThread( GetCurrentThread(), GetExceptionCode() );
|
NtTerminateThread( GetCurrentThread(), GetExceptionCode() );
|
||||||
}
|
}
|
||||||
|
|
|
@ -648,7 +648,7 @@ static NTSTATUS call_stack_handlers( EXCEPTION_RECORD *rec, CONTEXT *context )
|
||||||
/* hack: call unhandled exception filter directly */
|
/* hack: call unhandled exception filter directly */
|
||||||
ptrs.ExceptionRecord = rec;
|
ptrs.ExceptionRecord = rec;
|
||||||
ptrs.ContextRecord = context;
|
ptrs.ContextRecord = context;
|
||||||
unhandled_exception_filter( &ptrs );
|
call_unhandled_exception_filter( &ptrs );
|
||||||
return STATUS_UNHANDLED_EXCEPTION;
|
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 );
|
TRACE_(relay)( "\1Starting thread proc %p (arg=%p)\n", entry, arg );
|
||||||
RtlExitUserThread( entry( arg ));
|
RtlExitUserThread( entry( arg ));
|
||||||
}
|
}
|
||||||
__EXCEPT(unhandled_exception_filter)
|
__EXCEPT(call_unhandled_exception_filter)
|
||||||
{
|
{
|
||||||
NtTerminateThread( GetCurrentThread(), GetExceptionCode() );
|
NtTerminateThread( GetCurrentThread(), GetExceptionCode() );
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 );
|
TRACE_(relay)( "\1Starting thread proc %p (arg=%p)\n", entry, arg );
|
||||||
RtlExitUserThread( entry( arg ));
|
RtlExitUserThread( entry( arg ));
|
||||||
}
|
}
|
||||||
__EXCEPT(unhandled_exception_filter)
|
__EXCEPT(call_unhandled_exception_filter)
|
||||||
{
|
{
|
||||||
NtTerminateThread( GetCurrentThread(), GetExceptionCode() );
|
NtTerminateThread( GetCurrentThread(), GetExceptionCode() );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue