msvcrt: Add i386 _IsExceptionObjectToBeDestroyed implementation.

Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Piotr Caban 2016-03-15 13:40:46 +01:00 committed by Alexandre Julliard
parent 373a02c641
commit 0ef61844b8
12 changed files with 54 additions and 9 deletions

View File

@ -4,7 +4,7 @@
@ stub _FindAndUnlinkFrame
@ stub _GetImageBase
@ stub _GetThrowImageBase
@ stub _IsExceptionObjectToBeDestroyed
@ cdecl -arch=i386,x86_64,arm _IsExceptionObjectToBeDestroyed(ptr) ucrtbase._IsExceptionObjectToBeDestroyed
@ stub _NLG_Dispatch2
@ stub _NLG_Return
@ stub _NLG_Return2

View File

@ -530,7 +530,7 @@
@ cdecl _Getmonths()
@ cdecl _Gettnames()
@ extern _HUGE MSVCRT__HUGE
@ stub _IsExceptionObjectToBeDestroyed
@ cdecl -arch=i386,x86_64,arm _IsExceptionObjectToBeDestroyed(ptr)
@ stub _NLG_Dispatch2
@ stub _NLG_Return
@ stub _NLG_Return2

View File

@ -853,7 +853,7 @@
@ cdecl _Getmonths()
@ cdecl _Gettnames()
@ extern _HUGE MSVCRT__HUGE
@ stub _IsExceptionObjectToBeDestroyed
@ cdecl -arch=i386,x86_64,arm _IsExceptionObjectToBeDestroyed(ptr)
@ stub _Lock_shared_ptr_spin_lock
@ stub -arch=i386 _NLG_Dispatch2
@ stub -arch=arm,win64 __NLG_Dispatch2

View File

@ -837,7 +837,7 @@
@ cdecl _Getmonths()
@ cdecl _Gettnames()
@ extern _HUGE MSVCRT__HUGE
@ stub _IsExceptionObjectToBeDestroyed
@ cdecl -arch=i386,x86_64,arm _IsExceptionObjectToBeDestroyed(ptr)
@ stub _LCbuild
@ stub -arch=i386 _NLG_Dispatch2
@ stub -arch=arm,win64 __NLG_Dispatch2

View File

@ -831,7 +831,7 @@
@ cdecl _Getmonths() msvcr120._Getmonths
@ cdecl _Gettnames() msvcr120._Gettnames
@ extern _HUGE msvcr120._HUGE
@ stub _IsExceptionObjectToBeDestroyed
@ cdecl -arch=i386,x86_64,arm _IsExceptionObjectToBeDestroyed(ptr) msvcr120._IsExceptionObjectToBeDestroyed
@ stub _LCbuild
@ stub -arch=i386 _NLG_Dispatch2
@ stub -arch=arm,win64 __NLG_Dispatch2

View File

@ -162,7 +162,7 @@
@ cdecl _Getmonths()
@ cdecl _Gettnames()
@ extern _HUGE MSVCRT__HUGE
@ stub _IsExceptionObjectToBeDestroyed
@ cdecl -arch=i386,x86_64,arm _IsExceptionObjectToBeDestroyed(ptr)
@ stub -arch=i386 _NLG_Dispatch2
@ stub -arch=arm,win64 __NLG_Dispatch2
@ stub -arch=i386 _NLG_Return

View File

@ -157,7 +157,7 @@
@ cdecl _Getmonths()
@ cdecl _Gettnames()
@ extern _HUGE MSVCRT__HUGE
@ stub _IsExceptionObjectToBeDestroyed
@ cdecl -arch=i386,x86_64,arm _IsExceptionObjectToBeDestroyed(ptr)
@ stub _NLG_Dispatch2
@ stub _NLG_Return
@ stub _NLG_Return2

View File

@ -74,6 +74,15 @@ int CDECL __CxxExceptionFilter( PEXCEPTION_POINTERS ptrs,
return EXCEPTION_CONTINUE_SEARCH;
}
/*********************************************************************
* _IsExceptionObjectToBeDestroyed (MSVCR80.@)
*/
BOOL __cdecl _IsExceptionObjectToBeDestroyed(const void *obj)
{
FIXME("%p not implemented\n", obj);
return FALSE;
}
/*********************************************************************
* __CxxFrameHandler (MSVCRT.@)
*/

View File

@ -415,6 +415,33 @@ static DWORD catch_function_nested_handler( EXCEPTION_RECORD *rec, EXCEPTION_REG
nested_frame->trylevel );
}
/*********************************************************************
* _IsExceptionObjectToBeDestroyed (MSVCR80.@)
*/
BOOL __cdecl _IsExceptionObjectToBeDestroyed(const void *obj)
{
EXCEPTION_REGISTRATION_RECORD *reg = NtCurrentTeb()->Tib.ExceptionList;
TRACE( "%p\n", obj );
while (reg != (EXCEPTION_REGISTRATION_RECORD*)-1)
{
if (reg->Handler == catch_function_nested_handler)
{
EXCEPTION_RECORD *rec = ((struct catch_func_nested_frame*)reg)->rec;
if(!(rec->ExceptionFlags & (EH_UNWINDING | EH_EXIT_UNWIND))
&& rec->ExceptionCode == CXX_EXCEPTION && rec->NumberParameters == 3
&& rec->ExceptionInformation[1] == (LONG_PTR)obj)
return FALSE;
}
reg = reg->Prev;
}
return TRUE;
}
/* find and call the appropriate catch block for an exception */
/* returns the address to continue execution to after the catch block was called */
static inline void call_catch_block( PEXCEPTION_RECORD rec, cxx_exception_frame *frame,

View File

@ -71,6 +71,15 @@ int CDECL __CxxExceptionFilter( PEXCEPTION_POINTERS ptrs,
return EXCEPTION_CONTINUE_SEARCH;
}
/*********************************************************************
* _IsExceptionObjectToBeDestroyed (MSVCR80.@)
*/
BOOL __cdecl _IsExceptionObjectToBeDestroyed(const void *obj)
{
FIXME ( "%p not implemented\n", obj );
return FALSE;
}
/*********************************************************************
* __CxxFrameHandler (MSVCRT.@)
*/

View File

@ -30,7 +30,7 @@
@ cdecl _Getdays()
@ cdecl _Getmonths()
@ cdecl _Gettnames()
@ stub _IsExceptionObjectToBeDestroyed
@ cdecl -arch=i386,x86_64,arm _IsExceptionObjectToBeDestroyed(ptr)
@ stub _LCbuild
@ stub _LCmulcc
@ stub _LCmulcr

View File

@ -2,7 +2,7 @@
@ stdcall _CxxThrowException(long long) ucrtbase._CxxThrowException
@ cdecl -arch=i386 -norelay _EH_prolog() ucrtbase._EH_prolog
@ stub _FindAndUnlinkFrame
@ stub _IsExceptionObjectToBeDestroyed
@ cdecl -arch=i386,x86_64,arm _IsExceptionObjectToBeDestroyed(ptr) ucrtbase._IsExceptionObjectToBeDestroyed
@ stub _NLG_Dispatch2
@ stub _NLG_Return
@ stub _NLG_Return2