Module: wine Branch: master Commit: 7d98599d7daaa3497a5de6445011ed4a9470c1a0 URL: http://source.winehq.org/git/wine.git/?a=commit;h=7d98599d7daaa3497a5de64450...
Author: Alexandre Julliard julliard@winehq.org Date: Fri Dec 15 13:41:48 2006 +0100
msvcrt: Implemented __CxxLongjmpUnwind.
---
dlls/msvcrt/cppexcept.c | 14 ++++++++++++++ dlls/msvcrt/except.c | 2 +- dlls/msvcrt/msvcrt.spec | 2 +- 3 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/dlls/msvcrt/cppexcept.c b/dlls/msvcrt/cppexcept.c index c4679c3..e556353 100644 --- a/dlls/msvcrt/cppexcept.c +++ b/dlls/msvcrt/cppexcept.c @@ -469,3 +469,17 @@ unsigned int CDECL __CxxQueryExceptionSi { 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 ); +} diff --git a/dlls/msvcrt/except.c b/dlls/msvcrt/except.c index 80d6c71..a218387 100644 --- a/dlls/msvcrt/except.c +++ b/dlls/msvcrt/except.c @@ -259,7 +259,7 @@ int CDECL _abnormal_termination(void)
#ifdef __i386__ #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 */ /* and then jumps to the C backend function */ diff --git a/dlls/msvcrt/msvcrt.spec b/dlls/msvcrt/msvcrt.spec index 0b27bed..f236c24 100644 --- a/dlls/msvcrt/msvcrt.spec +++ b/dlls/msvcrt/msvcrt.spec @@ -76,7 +76,7 @@ @ cdecl _Strftime(str long str ptr ptr) @ cdecl _XcptFilter(long ptr) @ cdecl -i386 -norelay __CxxFrameHandler(ptr ptr ptr ptr) -@ stub __CxxLongjmpUnwind #(ptr) stdcall +@ stdcall __CxxLongjmpUnwind(ptr) @ cdecl __RTCastToVoid(ptr) MSVCRT___RTCastToVoid @ cdecl __RTDynamicCast(ptr long ptr ptr long) MSVCRT___RTDynamicCast @ cdecl __RTtypeid(ptr) MSVCRT___RTtypeid