msvcp140: Import __ExceptionPtrRethrow implementation.

This commit is contained in:
Paul Gofman 2022-10-11 15:39:56 -05:00 committed by Alexandre Julliard
parent 95b8a3a1c9
commit 58c0d78485
2 changed files with 25 additions and 2 deletions

View file

@ -1703,8 +1703,8 @@
@ cdecl -arch=win64 ?__ExceptionPtrCurrentException@@YAXPEAX@Z(ptr) msvcr120.?__ExceptionPtrCurrentException@@YAXPEAX@Z
@ cdecl -arch=win32 ?__ExceptionPtrDestroy@@YAXPAX@Z(ptr) __ExceptionPtrDestroy
@ cdecl -arch=win64 ?__ExceptionPtrDestroy@@YAXPEAX@Z(ptr) __ExceptionPtrDestroy
@ cdecl -arch=win32 ?__ExceptionPtrRethrow@@YAXPBX@Z(ptr) msvcr120.?__ExceptionPtrRethrow@@YAXPBX@Z
@ cdecl -arch=win64 ?__ExceptionPtrRethrow@@YAXPEBX@Z(ptr) msvcr120.?__ExceptionPtrRethrow@@YAXPEBX@Z
@ cdecl -arch=win32 ?__ExceptionPtrRethrow@@YAXPBX@Z(ptr) __ExceptionPtrRethrow
@ cdecl -arch=win64 ?__ExceptionPtrRethrow@@YAXPEBX@Z(ptr) __ExceptionPtrRethrow
@ stub -arch=win32 ?__ExceptionPtrSwap@@YAXPAX0@Z
@ stub -arch=win64 ?__ExceptionPtrSwap@@YAXPEAX0@Z
@ cdecl -arch=win32 ?__ExceptionPtrToBool@@YA_NPBX@Z(ptr) msvcr120.?__ExceptionPtrToBool@@YA_NPBX@Z

View file

@ -1044,6 +1044,29 @@ void __cdecl __ExceptionPtrAssign(exception_ptr *ep, const exception_ptr *assign
if (ep->ref)
InterlockedIncrement(ep->ref);
}
/*********************************************************************
* ?__ExceptionPtrRethrow@@YAXPBX@Z
* ?__ExceptionPtrRethrow@@YAXPEBX@Z
*/
void __cdecl __ExceptionPtrRethrow(const exception_ptr *ep)
{
TRACE("(%p)\n", ep);
if (!ep->rec)
{
static const char *exception_msg = "bad exception";
exception e;
MSVCP_exception_ctor(&e, &exception_msg);
_CxxThrowException(&e, &exception_cxx_type);
return;
}
RaiseException(ep->rec->ExceptionCode, ep->rec->ExceptionFlags & (~EH_UNWINDING),
ep->rec->NumberParameters, ep->rec->ExceptionInformation);
}
#endif
#if _MSVCP_VER >= 70 || defined(_MSVCIRT)