Commit 5f3d3a8d authored by Gerard Patel's avatar Gerard Patel Committed by Alexandre Julliard

Reorder parameters to fix position of base reg relative to exception

frame.
parent ab7fa6de
...@@ -98,10 +98,12 @@ static DWORD CALLBACK EXC_UnwindHandler( EXCEPTION_RECORD *rec, EXCEPTION_FRAME ...@@ -98,10 +98,12 @@ static DWORD CALLBACK EXC_UnwindHandler( EXCEPTION_RECORD *rec, EXCEPTION_FRAME
* *
* Call an exception handler, setting up an exception frame to catch exceptions * Call an exception handler, setting up an exception frame to catch exceptions
* happening during the handler execution. * happening during the handler execution.
* Please do not change the first 4 parameters order in any way - some exceptions handlers
* rely on Base Pointer (EBP) to have a fixed position related to the exception frame
*/ */
static DWORD EXC_CallHandler( PEXCEPTION_HANDLER handler, PEXCEPTION_HANDLER nested_handler, static DWORD EXC_CallHandler( EXCEPTION_RECORD *record, EXCEPTION_FRAME *frame,
EXCEPTION_RECORD *record, EXCEPTION_FRAME *frame, CONTEXT *context, EXCEPTION_FRAME **dispatcher,
CONTEXT *context, EXCEPTION_FRAME **dispatcher ) PEXCEPTION_HANDLER handler, PEXCEPTION_HANDLER nested_handler)
{ {
EXC_NESTED_FRAME newframe; EXC_NESTED_FRAME newframe;
DWORD ret; DWORD ret;
...@@ -175,7 +177,7 @@ void WINAPI REGS_FUNC(RtlRaiseException)( EXCEPTION_RECORD *rec, CONTEXT *contex ...@@ -175,7 +177,7 @@ void WINAPI REGS_FUNC(RtlRaiseException)( EXCEPTION_RECORD *rec, CONTEXT *contex
} }
/* Call handler */ /* Call handler */
res = EXC_CallHandler( frame->Handler, EXC_RaiseHandler, rec, frame, context, &dispatch ); res = EXC_CallHandler( rec, frame, context, &dispatch, frame->Handler, EXC_RaiseHandler );
if (frame == nested_frame) if (frame == nested_frame)
{ {
/* no longer nested */ /* no longer nested */
...@@ -267,8 +269,8 @@ void WINAPI REGS_FUNC(RtlUnwind)( PEXCEPTION_FRAME pEndFrame, LPVOID unusedEip, ...@@ -267,8 +269,8 @@ void WINAPI REGS_FUNC(RtlUnwind)( PEXCEPTION_FRAME pEndFrame, LPVOID unusedEip,
} }
/* Call handler */ /* Call handler */
switch(EXC_CallHandler( frame->Handler, EXC_UnwindHandler, pRecord, switch(EXC_CallHandler( pRecord, frame, context, &dispatch,
frame, context, &dispatch )) frame->Handler, EXC_UnwindHandler ))
{ {
case ExceptionContinueSearch: case ExceptionContinueSearch:
break; break;
......
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