msvcrt: Add __CxxRegisterExceptionObject 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-16 21:02:04 +01:00 committed by Alexandre Julliard
parent 29f547d2ce
commit 11ccffea08
14 changed files with 42 additions and 12 deletions

View File

@ -22,7 +22,7 @@
@ cdecl -arch=i386,x86_64,arm -norelay __CxxFrameHandler3(ptr ptr ptr ptr) ucrtbase.__CxxFrameHandler3
@ stdcall -arch=i386 __CxxLongjmpUnwind(ptr) ucrtbase.__CxxLongjmpUnwind
@ cdecl -arch=i386,x86_64,arm __CxxQueryExceptionSize() ucrtbase.__CxxQueryExceptionSize
@ stub __CxxRegisterExceptionObject
@ cdecl __CxxRegisterExceptionObject(ptr ptr) ucrtbase.__CxxRegisterExceptionObject
@ stub __CxxUnregisterExceptionObject
@ stub __DestructExceptionObject
@ stub __FrameUnwindFilter

View File

@ -554,7 +554,7 @@
@ cdecl -arch=i386,x86_64,arm -norelay __CxxFrameHandler3(ptr ptr ptr ptr) __CxxFrameHandler
@ stdcall -arch=i386 __CxxLongjmpUnwind(ptr)
@ cdecl -arch=i386,x86_64,arm __CxxQueryExceptionSize()
@ stub __CxxRegisterExceptionObject
@ cdecl __CxxRegisterExceptionObject(ptr ptr)
@ stub __CxxUnregisterExceptionObject
@ stub __DestructExceptionObject
@ stub __FrameUnwindFilter

View File

@ -881,7 +881,7 @@
@ cdecl -arch=i386,x86_64,arm -norelay __CxxFrameHandler3(ptr ptr ptr ptr) __CxxFrameHandler
@ stdcall -arch=i386 __CxxLongjmpUnwind(ptr)
@ cdecl -arch=i386,x86_64,arm __CxxQueryExceptionSize()
@ stub __CxxRegisterExceptionObject
@ cdecl __CxxRegisterExceptionObject(ptr ptr)
@ stub __CxxUnregisterExceptionObject
@ stub __DestructExceptionObject
@ stub __FrameUnwindFilter

View File

@ -865,7 +865,7 @@
@ cdecl -arch=i386,x86_64,arm -norelay __CxxFrameHandler3(ptr ptr ptr ptr) __CxxFrameHandler
@ stdcall -arch=i386 __CxxLongjmpUnwind(ptr)
@ cdecl -arch=i386,x86_64,arm __CxxQueryExceptionSize()
@ stub __CxxRegisterExceptionObject
@ cdecl __CxxRegisterExceptionObject(ptr ptr)
@ stub __CxxUnregisterExceptionObject
@ stub __DestructExceptionObject
@ stub __FrameUnwindFilter

View File

@ -859,7 +859,7 @@
@ cdecl -arch=i386,x86_64,arm -norelay __CxxFrameHandler3(ptr ptr ptr ptr) msvcr120.__CxxFrameHandler3
@ stdcall -arch=i386 __CxxLongjmpUnwind(ptr) msvcr120.__CxxLongjmpUnwind
@ cdecl -arch=i386,x86_64,arm __CxxQueryExceptionSize() msvcr120.__CxxQueryExceptionSize
@ stub __CxxRegisterExceptionObject
@ cdecl __CxxRegisterExceptionObject(ptr ptr) msvcr120.__CxxRegisterExceptionObject
@ stub __CxxUnregisterExceptionObject
@ stub __DestructExceptionObject
@ stub __FrameUnwindFilter

View File

@ -123,7 +123,7 @@
@ cdecl -arch=i386,x86_64,arm -norelay __CxxFrameHandler(ptr ptr ptr ptr)
@ stdcall -arch=i386 __CxxLongjmpUnwind(ptr)
@ cdecl -arch=i386,x86_64,arm __CxxQueryExceptionSize()
@ stub __CxxRegisterExceptionObject
@ cdecl __CxxRegisterExceptionObject(ptr ptr)
@ stub __CxxUnregisterExceptionObject
@ stub __DestructExceptionObject
@ cdecl __RTCastToVoid(ptr) MSVCRT___RTCastToVoid

View File

@ -118,7 +118,7 @@
@ cdecl -arch=i386,x86_64,arm -norelay __CxxFrameHandler(ptr ptr ptr ptr)
@ stdcall -arch=i386 __CxxLongjmpUnwind(ptr)
@ cdecl -arch=i386,x86_64,arm __CxxQueryExceptionSize()
@ stub __CxxRegisterExceptionObject
@ cdecl __CxxRegisterExceptionObject(ptr ptr)
@ stub __CxxUnregisterExceptionObject
@ stub __DestructExceptionObject
@ cdecl __RTCastToVoid(ptr) MSVCRT___RTCastToVoid

View File

@ -188,7 +188,7 @@
@ cdecl -arch=i386,x86_64,arm -norelay __CxxFrameHandler3(ptr ptr ptr ptr) __CxxFrameHandler
@ stdcall -arch=i386 __CxxLongjmpUnwind(ptr)
@ cdecl -arch=i386,x86_64,arm __CxxQueryExceptionSize()
@ stub __CxxRegisterExceptionObject
@ cdecl __CxxRegisterExceptionObject(ptr ptr)
@ stub __CxxUnregisterExceptionObject
@ stub __DestructExceptionObject
@ stub __FrameUnwindFilter

View File

@ -179,7 +179,7 @@
@ cdecl -arch=i386,x86_64,arm -norelay __CxxFrameHandler3(ptr ptr ptr ptr) __CxxFrameHandler
@ stdcall -arch=i386 __CxxLongjmpUnwind(ptr)
@ cdecl -arch=i386,x86_64,arm __CxxQueryExceptionSize()
@ stub __CxxRegisterExceptionObject
@ cdecl __CxxRegisterExceptionObject(ptr ptr)
@ stub __CxxUnregisterExceptionObject
@ stub __DestructExceptionObject
@ stub __FrameUnwindFilter

View File

@ -369,3 +369,26 @@ void CDECL _FindAndUnlinkFrame(frame_info *fi)
ERR("frame not found, native crashes in this case\n");
}
/*********************************************************************
* __CxxRegisterExceptionObject (MSVCRT.@)
*/
BOOL CDECL __CxxRegisterExceptionObject(EXCEPTION_RECORD **rec, cxx_frame_info *frame_info)
{
thread_data_t *data = msvcrt_get_thread_data();
TRACE("(%p, %p)\n", rec, frame_info);
if (!rec || !*rec)
{
frame_info->rec = (void*)-1;
frame_info->unk = (void*)-1;
return TRUE;
}
frame_info->rec = data->exc_record;
frame_info->unk = 0;
data->exc_record = *rec;
_CreateFrameInfo(&frame_info->frame_info, (void*)(*rec)->ExceptionInformation[1]);
return TRUE;
}

View File

@ -210,6 +210,13 @@ typedef struct _frame_info
struct _frame_info *next;
} frame_info;
typedef struct
{
frame_info frame_info;
EXCEPTION_RECORD *rec;
void *unk;
} cxx_frame_info;
/* TLS data */
extern DWORD msvcrt_tls_index DECLSPEC_HIDDEN;

View File

@ -184,7 +184,7 @@
@ cdecl -arch=i386,x86_64,arm -norelay __CxxFrameHandler3(ptr ptr ptr ptr) __CxxFrameHandler
@ stdcall -arch=i386 __CxxLongjmpUnwind(ptr)
@ cdecl -arch=i386,x86_64,arm __CxxQueryExceptionSize()
# stub __CxxRegisterExceptionObject
@ cdecl __CxxRegisterExceptionObject(ptr ptr)
# stub __CxxUnregisterExceptionObject
# stub __DestructExceptionObject
@ cdecl __RTCastToVoid(ptr) MSVCRT___RTCastToVoid

View File

@ -56,7 +56,7 @@
@ cdecl -arch=i386,x86_64,arm -norelay __CxxFrameHandler3(ptr ptr ptr ptr) __CxxFrameHandler
@ stdcall -arch=i386 __CxxLongjmpUnwind(ptr)
@ cdecl -arch=i386,x86_64,arm __CxxQueryExceptionSize()
@ stub __CxxRegisterExceptionObject
@ cdecl __CxxRegisterExceptionObject(ptr ptr)
@ stub __CxxUnregisterExceptionObject
@ stub __DestructExceptionObject
@ stub __FrameUnwindFilter

View File

@ -19,7 +19,7 @@
@ cdecl -arch=i386,x86_64,arm -norelay __CxxFrameHandler3(ptr ptr ptr ptr) ucrtbase.__CxxFrameHandler3
@ stdcall -arch=i386 __CxxLongjmpUnwind(ptr) ucrtbase.__CxxLongjmpUnwind
@ cdecl -arch=i386,x86_64,arm __CxxQueryExceptionSize() ucrtbase.__CxxQueryExceptionSize
@ stub __CxxRegisterExceptionObject
@ cdecl __CxxRegisterExceptionObject(ptr ptr) ucrtbase.__CxxRegisterExceptionObject
@ stub __CxxUnregisterExceptionObject
@ stub __DestructExceptionObject
@ stub __FrameUnwindFilter