ntdll: Capture the context inside RtlUnwindEx instead of assuming it's already initialized.

This commit is contained in:
Alexandre Julliard 2011-01-27 11:51:34 +01:00
parent 2e81ba5f4f
commit aa4ad6d766
1 changed files with 5 additions and 4 deletions

View File

@ -2783,6 +2783,8 @@ void WINAPI RtlUnwindEx( PVOID end_frame, PVOID target_ip, EXCEPTION_RECORD *rec
NTSTATUS status;
DWORD size;
RtlCaptureContext( orig_context );
/* build an exception record, if we do not have one */
if (!rec)
{
@ -2931,12 +2933,11 @@ void WINAPI RtlUnwindEx( PVOID end_frame, PVOID target_ip, EXCEPTION_RECORD *rec
/*******************************************************************
* RtlUnwind (NTDLL.@)
*/
void WINAPI __regs_RtlUnwind( void *frame, void *target_ip, EXCEPTION_RECORD *rec,
void *retval, CONTEXT *context )
void WINAPI RtlUnwind( void *frame, void *target_ip, EXCEPTION_RECORD *rec, void *retval )
{
RtlUnwindEx( frame, target_ip, rec, retval, context, NULL );
CONTEXT context;
RtlUnwindEx( frame, target_ip, rec, retval, &context, NULL );
}
DEFINE_REGS_ENTRYPOINT( RtlUnwind, 4 )
/*******************************************************************