Commit 0ef61844 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

msvcrt: Add i386 _IsExceptionObjectToBeDestroyed implementation.

parent 373a02c6
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -75,6 +75,15 @@ int CDECL __CxxExceptionFilter( PEXCEPTION_POINTERS ptrs,
}
/*********************************************************************
* _IsExceptionObjectToBeDestroyed (MSVCR80.@)
*/
BOOL __cdecl _IsExceptionObjectToBeDestroyed(const void *obj)
{
FIXME("%p not implemented\n", obj);
return FALSE;
}
/*********************************************************************
* __CxxFrameHandler (MSVCRT.@)
*/
EXCEPTION_DISPOSITION CDECL __CxxFrameHandler(EXCEPTION_RECORD *rec, DWORD frame, CONTEXT *context,
......
......@@ -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,
......
......@@ -72,6 +72,15 @@ int CDECL __CxxExceptionFilter( PEXCEPTION_POINTERS ptrs,
}
/*********************************************************************
* _IsExceptionObjectToBeDestroyed (MSVCR80.@)
*/
BOOL __cdecl _IsExceptionObjectToBeDestroyed(const void *obj)
{
FIXME ( "%p not implemented\n", obj );
return FALSE;
}
/*********************************************************************
* __CxxFrameHandler (MSVCRT.@)
*/
EXCEPTION_DISPOSITION CDECL __CxxFrameHandler( EXCEPTION_RECORD *rec, ULONG64 frame,
......
......@@ -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
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment