Commit 7d98599d authored by Alexandre Julliard's avatar Alexandre Julliard

msvcrt: Implemented __CxxLongjmpUnwind.

parent 8592c4b8
...@@ -469,3 +469,17 @@ unsigned int CDECL __CxxQueryExceptionSize(void) ...@@ -469,3 +469,17 @@ unsigned int CDECL __CxxQueryExceptionSize(void)
{ {
return sizeof(cxx_exception_type); return sizeof(cxx_exception_type);
} }
/*********************************************************************
* __CxxLongjmpUnwind (MSVCRT.@)
*
* Callback meant to be used as UnwindFunc for setjmp/longjmp.
*/
void __stdcall __CxxLongjmpUnwind( const struct MSVCRT___JUMP_BUFFER *buf )
{
cxx_exception_frame *frame = (cxx_exception_frame *)buf->Registration;
const cxx_function_descr *descr = (const cxx_function_descr *)buf->UnwindData[0];
TRACE( "unwinding frame %p descr %p trylevel %ld\n", frame, descr, buf->TryLevel );
cxx_local_unwind( frame, descr, buf->TryLevel );
}
...@@ -259,7 +259,7 @@ int CDECL _abnormal_termination(void) ...@@ -259,7 +259,7 @@ int CDECL _abnormal_termination(void)
#ifdef __i386__ #ifdef __i386__
#define MSVCRT_JMP_MAGIC 0x56433230 /* ID value for new jump structure */ #define MSVCRT_JMP_MAGIC 0x56433230 /* ID value for new jump structure */
typedef void (*MSVCRT_unwind_function)(const void*); typedef void (__stdcall *MSVCRT_unwind_function)(const struct MSVCRT___JUMP_BUFFER *);
/* define an entrypoint for setjmp/setjmp3 that stores the registers in the jmp buf */ /* define an entrypoint for setjmp/setjmp3 that stores the registers in the jmp buf */
/* and then jumps to the C backend function */ /* and then jumps to the C backend function */
......
...@@ -76,7 +76,7 @@ ...@@ -76,7 +76,7 @@
@ cdecl _Strftime(str long str ptr ptr) @ cdecl _Strftime(str long str ptr ptr)
@ cdecl _XcptFilter(long ptr) @ cdecl _XcptFilter(long ptr)
@ cdecl -i386 -norelay __CxxFrameHandler(ptr ptr ptr ptr) @ cdecl -i386 -norelay __CxxFrameHandler(ptr ptr ptr ptr)
@ stub __CxxLongjmpUnwind #(ptr) stdcall @ stdcall __CxxLongjmpUnwind(ptr)
@ cdecl __RTCastToVoid(ptr) MSVCRT___RTCastToVoid @ cdecl __RTCastToVoid(ptr) MSVCRT___RTCastToVoid
@ cdecl __RTDynamicCast(ptr long ptr ptr long) MSVCRT___RTDynamicCast @ cdecl __RTDynamicCast(ptr long ptr ptr long) MSVCRT___RTDynamicCast
@ cdecl __RTtypeid(ptr) MSVCRT___RTtypeid @ cdecl __RTtypeid(ptr) MSVCRT___RTtypeid
......
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