Commit 97259a30 authored by Alexandre Julliard's avatar Alexandre Julliard

ntdll: Use the official definitions for exception flags.

parent 7a66313c
......@@ -267,7 +267,7 @@ NTSTATUS WINAPI dispatch_exception( EXCEPTION_RECORD *rec, CONTEXT *context )
EXCEPTION_DISPOSITION WINAPI user_callback_handler( EXCEPTION_RECORD *record, void *frame,
CONTEXT *context, void *dispatch )
{
if (!(record->ExceptionFlags & (EH_UNWINDING | EH_EXIT_UNWIND)))
if (!(record->ExceptionFlags & (EXCEPTION_UNWINDING | EXCEPTION_EXIT_UNWIND)))
{
ERR( "ignoring exception %lx\n", record->ExceptionCode );
RtlUnwind( frame, KiUserCallbackDispatcherReturn, record, ULongToPtr(record->ExceptionCode) );
......@@ -308,7 +308,7 @@ NTSTATUS WINAPI dispatch_user_callback( void *args, ULONG len, ULONG id )
EXCEPTION_DISPOSITION WINAPI nested_exception_handler( EXCEPTION_RECORD *rec, void *frame,
CONTEXT *context, void *dispatch )
{
if (rec->ExceptionFlags & (EH_UNWINDING | EH_EXIT_UNWIND)) return ExceptionContinueSearch;
if (rec->ExceptionFlags & (EXCEPTION_UNWINDING | EXCEPTION_EXIT_UNWIND)) return ExceptionContinueSearch;
return ExceptionNestedException;
}
......@@ -323,7 +323,7 @@ void DECLSPEC_NORETURN raise_status( NTSTATUS status, EXCEPTION_RECORD *rec )
EXCEPTION_RECORD ExceptionRec;
ExceptionRec.ExceptionCode = status;
ExceptionRec.ExceptionFlags = EH_NONCONTINUABLE;
ExceptionRec.ExceptionFlags = EXCEPTION_NONCONTINUABLE;
ExceptionRec.ExceptionRecord = rec;
ExceptionRec.NumberParameters = 0;
for (;;) RtlRaiseException( &ExceptionRec ); /* never returns */
......@@ -450,7 +450,7 @@ void __cdecl __wine_spec_unimplemented_stub( const char *module, const char *fun
EXCEPTION_RECORD record;
record.ExceptionCode = EXCEPTION_WINE_STUB;
record.ExceptionFlags = EH_NONCONTINUABLE;
record.ExceptionFlags = EXCEPTION_NONCONTINUABLE;
record.ExceptionRecord = NULL;
record.ExceptionAddress = __wine_spec_unimplemented_stub;
record.NumberParameters = 2;
......
......@@ -389,7 +389,7 @@ static void WINAPI stub_entry_point( const char *dll, const char *name, void *re
EXCEPTION_RECORD rec;
rec.ExceptionCode = EXCEPTION_WINE_STUB;
rec.ExceptionFlags = EH_NONCONTINUABLE;
rec.ExceptionFlags = EXCEPTION_NONCONTINUABLE;
rec.ExceptionRecord = NULL;
rec.ExceptionAddress = ret_addr;
rec.NumberParameters = 2;
......
......@@ -300,7 +300,7 @@ static DWORD call_handler( EXCEPTION_RECORD *rec, CONTEXT *context, DISPATCHER_C
res = call_handler_wrapper( rec, context, dispatch );
TRACE( "handler at %p returned %lu\n", dispatch->LanguageHandler, res );
rec->ExceptionFlags &= EH_NONCONTINUABLE;
rec->ExceptionFlags &= EXCEPTION_NONCONTINUABLE;
return res;
}
......@@ -356,7 +356,7 @@ NTSTATUS call_seh_handlers( EXCEPTION_RECORD *rec, CONTEXT *orig_context )
{
ERR( "invalid frame %lx (%p-%p)\n", dispatch.EstablisherFrame,
NtCurrentTeb()->Tib.StackLimit, NtCurrentTeb()->Tib.StackBase );
rec->ExceptionFlags |= EH_STACK_INVALID;
rec->ExceptionFlags |= EXCEPTION_STACK_INVALID;
break;
}
......@@ -365,12 +365,12 @@ NTSTATUS call_seh_handlers( EXCEPTION_RECORD *rec, CONTEXT *orig_context )
switch (call_handler( rec, orig_context, &dispatch ))
{
case ExceptionContinueExecution:
if (rec->ExceptionFlags & EH_NONCONTINUABLE) return STATUS_NONCONTINUABLE_EXCEPTION;
if (rec->ExceptionFlags & EXCEPTION_NONCONTINUABLE) return STATUS_NONCONTINUABLE_EXCEPTION;
return STATUS_SUCCESS;
case ExceptionContinueSearch:
break;
case ExceptionNestedException:
rec->ExceptionFlags |= EH_NESTED_CALL;
rec->ExceptionFlags |= EXCEPTION_NESTED_CALL;
TRACE( "nested exception\n" );
break;
case ExceptionCollidedUnwind: {
......@@ -396,12 +396,12 @@ NTSTATUS call_seh_handlers( EXCEPTION_RECORD *rec, CONTEXT *orig_context )
switch (call_teb_handler( rec, orig_context, &dispatch, teb_frame ))
{
case ExceptionContinueExecution:
if (rec->ExceptionFlags & EH_NONCONTINUABLE) return STATUS_NONCONTINUABLE_EXCEPTION;
if (rec->ExceptionFlags & EXCEPTION_NONCONTINUABLE) return STATUS_NONCONTINUABLE_EXCEPTION;
return STATUS_SUCCESS;
case ExceptionContinueSearch:
break;
case ExceptionNestedException:
rec->ExceptionFlags |= EH_NESTED_CALL;
rec->ExceptionFlags |= EXCEPTION_NESTED_CALL;
TRACE( "nested exception\n" );
break;
case ExceptionCollidedUnwind: {
......@@ -655,7 +655,7 @@ void WINAPI RtlUnwindEx( PVOID end_frame, PVOID target_ip, EXCEPTION_RECORD *rec
rec = &record;
}
rec->ExceptionFlags |= EH_UNWINDING | (end_frame ? 0 : EH_EXIT_UNWIND);
rec->ExceptionFlags |= EXCEPTION_UNWINDING | (end_frame ? 0 : EXCEPTION_EXIT_UNWIND);
TRACE( "code=%lx flags=%lx end_frame=%p target_ip=%p\n",
rec->ExceptionCode, rec->ExceptionFlags, end_frame, target_ip );
......@@ -680,7 +680,7 @@ void WINAPI RtlUnwindEx( PVOID end_frame, PVOID target_ip, EXCEPTION_RECORD *rec
{
ERR( "invalid frame %lx (%p-%p)\n", dispatch.EstablisherFrame,
NtCurrentTeb()->Tib.StackLimit, NtCurrentTeb()->Tib.StackBase );
rec->ExceptionFlags |= EH_STACK_INVALID;
rec->ExceptionFlags |= EXCEPTION_STACK_INVALID;
break;
}
......@@ -691,7 +691,7 @@ void WINAPI RtlUnwindEx( PVOID end_frame, PVOID target_ip, EXCEPTION_RECORD *rec
ERR( "invalid end frame %lx/%p\n", dispatch.EstablisherFrame, end_frame );
raise_status( STATUS_INVALID_UNWIND_TARGET, rec );
}
if (dispatch.EstablisherFrame == (DWORD)end_frame) rec->ExceptionFlags |= EH_TARGET_UNWIND;
if (dispatch.EstablisherFrame == (DWORD)end_frame) rec->ExceptionFlags |= EXCEPTION_TARGET_UNWIND;
if (call_unwind_handler( rec, &dispatch ) == ExceptionCollidedUnwind)
{
ULONG_PTR frame;
......@@ -702,10 +702,10 @@ void WINAPI RtlUnwindEx( PVOID end_frame, PVOID target_ip, EXCEPTION_RECORD *rec
dispatch.ControlPc, dispatch.FunctionEntry,
&new_context, &dispatch.HandlerData, &frame,
NULL );
rec->ExceptionFlags |= EH_COLLIDED_UNWIND;
rec->ExceptionFlags |= EXCEPTION_COLLIDED_UNWIND;
goto unwind_done;
}
rec->ExceptionFlags &= ~EH_COLLIDED_UNWIND;
rec->ExceptionFlags &= ~EXCEPTION_COLLIDED_UNWIND;
}
else /* hack: call builtin handlers registered in the tib list */
{
......@@ -728,7 +728,7 @@ void WINAPI RtlUnwindEx( PVOID end_frame, PVOID target_ip, EXCEPTION_RECORD *rec
dispatch.ControlPc, dispatch.FunctionEntry,
&new_context, &dispatch.HandlerData,
&frame, NULL );
rec->ExceptionFlags |= EH_COLLIDED_UNWIND;
rec->ExceptionFlags |= EXCEPTION_COLLIDED_UNWIND;
goto unwind_done;
}
teb_frame = __wine_pop_frame( teb_frame );
......@@ -796,7 +796,7 @@ EXCEPTION_DISPOSITION WINAPI __C_specific_handler( EXCEPTION_RECORD *rec,
if (dispatch->ControlPcIsUnwound)
ControlPc -= 2;
if (rec->ExceptionFlags & (EH_UNWINDING | EH_EXIT_UNWIND))
if (rec->ExceptionFlags & (EXCEPTION_UNWINDING | EXCEPTION_EXIT_UNWIND))
{
for (i = dispatch->ScopeIndex; i < table->Count; i++)
{
......@@ -807,7 +807,7 @@ EXCEPTION_DISPOSITION WINAPI __C_specific_handler( EXCEPTION_RECORD *rec,
if (table->ScopeRecord[i].JumpTarget) continue;
if (rec->ExceptionFlags & EH_TARGET_UNWIND &&
if (rec->ExceptionFlags & EXCEPTION_TARGET_UNWIND &&
dispatch->TargetPc >= dispatch->ImageBase + table->ScopeRecord[i].BeginAddress &&
dispatch->TargetPc < dispatch->ImageBase + table->ScopeRecord[i].EndAddress)
{
......
......@@ -302,7 +302,7 @@ static DWORD call_handler( EXCEPTION_RECORD *rec, CONTEXT *context, DISPATCHER_C
res = call_handler_wrapper( rec, context, dispatch );
TRACE( "handler at %p returned %lu\n", dispatch->LanguageHandler, res );
rec->ExceptionFlags &= EH_NONCONTINUABLE;
rec->ExceptionFlags &= EXCEPTION_NONCONTINUABLE;
return res;
}
......@@ -358,7 +358,7 @@ NTSTATUS call_seh_handlers( EXCEPTION_RECORD *rec, CONTEXT *orig_context )
{
ERR( "invalid frame %I64x (%p-%p)\n", dispatch.EstablisherFrame,
NtCurrentTeb()->Tib.StackLimit, NtCurrentTeb()->Tib.StackBase );
rec->ExceptionFlags |= EH_STACK_INVALID;
rec->ExceptionFlags |= EXCEPTION_STACK_INVALID;
break;
}
......@@ -367,12 +367,12 @@ NTSTATUS call_seh_handlers( EXCEPTION_RECORD *rec, CONTEXT *orig_context )
switch (call_handler( rec, orig_context, &dispatch ))
{
case ExceptionContinueExecution:
if (rec->ExceptionFlags & EH_NONCONTINUABLE) return STATUS_NONCONTINUABLE_EXCEPTION;
if (rec->ExceptionFlags & EXCEPTION_NONCONTINUABLE) return STATUS_NONCONTINUABLE_EXCEPTION;
return STATUS_SUCCESS;
case ExceptionContinueSearch:
break;
case ExceptionNestedException:
rec->ExceptionFlags |= EH_NESTED_CALL;
rec->ExceptionFlags |= EXCEPTION_NESTED_CALL;
TRACE( "nested exception\n" );
break;
case ExceptionCollidedUnwind: {
......@@ -398,12 +398,12 @@ NTSTATUS call_seh_handlers( EXCEPTION_RECORD *rec, CONTEXT *orig_context )
switch (call_teb_handler( rec, orig_context, &dispatch, teb_frame ))
{
case ExceptionContinueExecution:
if (rec->ExceptionFlags & EH_NONCONTINUABLE) return STATUS_NONCONTINUABLE_EXCEPTION;
if (rec->ExceptionFlags & EXCEPTION_NONCONTINUABLE) return STATUS_NONCONTINUABLE_EXCEPTION;
return STATUS_SUCCESS;
case ExceptionContinueSearch:
break;
case ExceptionNestedException:
rec->ExceptionFlags |= EH_NESTED_CALL;
rec->ExceptionFlags |= EXCEPTION_NESTED_CALL;
TRACE( "nested exception\n" );
break;
case ExceptionCollidedUnwind: {
......@@ -648,7 +648,7 @@ void WINAPI RtlUnwindEx( PVOID end_frame, PVOID target_ip, EXCEPTION_RECORD *rec
rec = &record;
}
rec->ExceptionFlags |= EH_UNWINDING | (end_frame ? 0 : EH_EXIT_UNWIND);
rec->ExceptionFlags |= EXCEPTION_UNWINDING | (end_frame ? 0 : EXCEPTION_EXIT_UNWIND);
TRACE( "code=%lx flags=%lx end_frame=%p target_ip=%p\n",
rec->ExceptionCode, rec->ExceptionFlags, end_frame, target_ip );
......@@ -673,7 +673,7 @@ void WINAPI RtlUnwindEx( PVOID end_frame, PVOID target_ip, EXCEPTION_RECORD *rec
{
ERR( "invalid frame %I64x (%p-%p)\n", dispatch.EstablisherFrame,
NtCurrentTeb()->Tib.StackLimit, NtCurrentTeb()->Tib.StackBase );
rec->ExceptionFlags |= EH_STACK_INVALID;
rec->ExceptionFlags |= EXCEPTION_STACK_INVALID;
break;
}
......@@ -684,7 +684,7 @@ void WINAPI RtlUnwindEx( PVOID end_frame, PVOID target_ip, EXCEPTION_RECORD *rec
ERR( "invalid end frame %I64x/%p\n", dispatch.EstablisherFrame, end_frame );
raise_status( STATUS_INVALID_UNWIND_TARGET, rec );
}
if (dispatch.EstablisherFrame == (ULONG64)end_frame) rec->ExceptionFlags |= EH_TARGET_UNWIND;
if (dispatch.EstablisherFrame == (ULONG64)end_frame) rec->ExceptionFlags |= EXCEPTION_TARGET_UNWIND;
if (call_unwind_handler( rec, &dispatch ) == ExceptionCollidedUnwind)
{
ULONG64 frame;
......@@ -695,10 +695,10 @@ void WINAPI RtlUnwindEx( PVOID end_frame, PVOID target_ip, EXCEPTION_RECORD *rec
dispatch.ControlPc, dispatch.FunctionEntry,
&new_context, &dispatch.HandlerData, &frame,
NULL );
rec->ExceptionFlags |= EH_COLLIDED_UNWIND;
rec->ExceptionFlags |= EXCEPTION_COLLIDED_UNWIND;
goto unwind_done;
}
rec->ExceptionFlags &= ~EH_COLLIDED_UNWIND;
rec->ExceptionFlags &= ~EXCEPTION_COLLIDED_UNWIND;
}
else /* hack: call builtin handlers registered in the tib list */
{
......@@ -721,7 +721,7 @@ void WINAPI RtlUnwindEx( PVOID end_frame, PVOID target_ip, EXCEPTION_RECORD *rec
dispatch.ControlPc, dispatch.FunctionEntry,
&new_context, &dispatch.HandlerData,
&frame, NULL );
rec->ExceptionFlags |= EH_COLLIDED_UNWIND;
rec->ExceptionFlags |= EXCEPTION_COLLIDED_UNWIND;
goto unwind_done;
}
teb_frame = __wine_pop_frame( teb_frame );
......@@ -816,7 +816,7 @@ EXCEPTION_DISPOSITION WINAPI __C_specific_handler( EXCEPTION_RECORD *rec,
if (dispatch->ControlPcIsUnwound)
ControlPc -= 4;
if (rec->ExceptionFlags & (EH_UNWINDING | EH_EXIT_UNWIND))
if (rec->ExceptionFlags & (EXCEPTION_UNWINDING | EXCEPTION_EXIT_UNWIND))
{
for (i = dispatch->ScopeIndex; i < table->Count; i++)
{
......@@ -827,7 +827,7 @@ EXCEPTION_DISPOSITION WINAPI __C_specific_handler( EXCEPTION_RECORD *rec,
if (table->ScopeRecord[i].JumpTarget) continue;
if (rec->ExceptionFlags & EH_TARGET_UNWIND &&
if (rec->ExceptionFlags & EXCEPTION_TARGET_UNWIND &&
dispatch->TargetPc >= dispatch->ImageBase + table->ScopeRecord[i].BeginAddress &&
dispatch->TargetPc < dispatch->ImageBase + table->ScopeRecord[i].EndAddress)
{
......
......@@ -113,7 +113,7 @@ DEFINE_SYSCALL_HELPER32()
static DWORD raise_handler( EXCEPTION_RECORD *rec, EXCEPTION_REGISTRATION_RECORD *frame,
CONTEXT *context, EXCEPTION_REGISTRATION_RECORD **dispatcher )
{
if (rec->ExceptionFlags & (EH_UNWINDING | EH_EXIT_UNWIND))
if (rec->ExceptionFlags & (EXCEPTION_UNWINDING | EXCEPTION_EXIT_UNWIND))
return ExceptionContinueSearch;
/* We shouldn't get here so we store faulty frame in dispatcher */
*dispatcher = ((EXC_NESTED_FRAME*)frame)->prevFrame;
......@@ -129,7 +129,7 @@ static DWORD raise_handler( EXCEPTION_RECORD *rec, EXCEPTION_REGISTRATION_RECORD
static DWORD unwind_handler( EXCEPTION_RECORD *rec, EXCEPTION_REGISTRATION_RECORD *frame,
CONTEXT *context, EXCEPTION_REGISTRATION_RECORD **dispatcher )
{
if (!(rec->ExceptionFlags & (EH_UNWINDING | EH_EXIT_UNWIND)))
if (!(rec->ExceptionFlags & (EXCEPTION_UNWINDING | EXCEPTION_EXIT_UNWIND)))
return ExceptionContinueSearch;
/* We shouldn't get here so we store faulty frame in dispatcher */
*dispatcher = ((EXC_NESTED_FRAME*)frame)->prevFrame;
......@@ -154,7 +154,7 @@ NTSTATUS call_seh_handlers( EXCEPTION_RECORD *rec, CONTEXT *context )
/* Check frame address */
if (!is_valid_frame( (ULONG_PTR)frame ))
{
rec->ExceptionFlags |= EH_STACK_INVALID;
rec->ExceptionFlags |= EXCEPTION_STACK_INVALID;
break;
}
......@@ -168,19 +168,19 @@ NTSTATUS call_seh_handlers( EXCEPTION_RECORD *rec, CONTEXT *context )
{
/* no longer nested */
nested_frame = NULL;
rec->ExceptionFlags &= ~EH_NESTED_CALL;
rec->ExceptionFlags &= ~EXCEPTION_NESTED_CALL;
}
switch(res)
{
case ExceptionContinueExecution:
if (!(rec->ExceptionFlags & EH_NONCONTINUABLE)) return STATUS_SUCCESS;
if (!(rec->ExceptionFlags & EXCEPTION_NONCONTINUABLE)) return STATUS_SUCCESS;
return STATUS_NONCONTINUABLE_EXCEPTION;
case ExceptionContinueSearch:
break;
case ExceptionNestedException:
if (nested_frame < dispatch) nested_frame = dispatch;
rec->ExceptionFlags |= EH_NESTED_CALL;
rec->ExceptionFlags |= EXCEPTION_NESTED_CALL;
break;
default:
return STATUS_INVALID_DISPOSITION;
......@@ -341,7 +341,7 @@ void WINAPI __regs_RtlUnwind( EXCEPTION_REGISTRATION_RECORD* pEndFrame, PVOID ta
pRecord = &record;
}
pRecord->ExceptionFlags |= EH_UNWINDING | (pEndFrame ? 0 : EH_EXIT_UNWIND);
pRecord->ExceptionFlags |= EXCEPTION_UNWINDING | (pEndFrame ? 0 : EXCEPTION_EXIT_UNWIND);
TRACE( "code=%lx flags=%lx\n", pRecord->ExceptionCode, pRecord->ExceptionFlags );
TRACE_CONTEXT( context );
......
......@@ -220,7 +220,7 @@ static DWORD call_handler( EXCEPTION_RECORD *rec, CONTEXT *context, DISPATCHER_C
res = exception_handler_call_wrapper( rec, (void *)dispatch->EstablisherFrame, context, dispatch );
TRACE( "handler at %p returned %lu\n", dispatch->LanguageHandler, res );
rec->ExceptionFlags &= EH_NONCONTINUABLE;
rec->ExceptionFlags &= EXCEPTION_NONCONTINUABLE;
return res;
}
......@@ -275,7 +275,7 @@ NTSTATUS call_seh_handlers( EXCEPTION_RECORD *rec, CONTEXT *orig_context )
{
ERR( "invalid frame %p (%p-%p)\n", (void *)dispatch.EstablisherFrame,
NtCurrentTeb()->Tib.StackLimit, NtCurrentTeb()->Tib.StackBase );
rec->ExceptionFlags |= EH_STACK_INVALID;
rec->ExceptionFlags |= EXCEPTION_STACK_INVALID;
break;
}
......@@ -284,12 +284,12 @@ NTSTATUS call_seh_handlers( EXCEPTION_RECORD *rec, CONTEXT *orig_context )
switch (call_handler( rec, orig_context, &dispatch ))
{
case ExceptionContinueExecution:
if (rec->ExceptionFlags & EH_NONCONTINUABLE) return STATUS_NONCONTINUABLE_EXCEPTION;
if (rec->ExceptionFlags & EXCEPTION_NONCONTINUABLE) return STATUS_NONCONTINUABLE_EXCEPTION;
return STATUS_SUCCESS;
case ExceptionContinueSearch:
break;
case ExceptionNestedException:
rec->ExceptionFlags |= EH_NESTED_CALL;
rec->ExceptionFlags |= EXCEPTION_NESTED_CALL;
TRACE( "nested exception\n" );
break;
case ExceptionCollidedUnwind: {
......@@ -315,12 +315,12 @@ NTSTATUS call_seh_handlers( EXCEPTION_RECORD *rec, CONTEXT *orig_context )
switch (call_teb_handler( rec, orig_context, &dispatch, teb_frame ))
{
case ExceptionContinueExecution:
if (rec->ExceptionFlags & EH_NONCONTINUABLE) return STATUS_NONCONTINUABLE_EXCEPTION;
if (rec->ExceptionFlags & EXCEPTION_NONCONTINUABLE) return STATUS_NONCONTINUABLE_EXCEPTION;
return STATUS_SUCCESS;
case ExceptionContinueSearch:
break;
case ExceptionNestedException:
rec->ExceptionFlags |= EH_NESTED_CALL;
rec->ExceptionFlags |= EXCEPTION_NESTED_CALL;
TRACE( "nested exception\n" );
break;
case ExceptionCollidedUnwind: {
......@@ -799,7 +799,7 @@ void WINAPI RtlUnwindEx( PVOID end_frame, PVOID target_ip, EXCEPTION_RECORD *rec
rec = &record;
}
rec->ExceptionFlags |= EH_UNWINDING | (end_frame ? 0 : EH_EXIT_UNWIND);
rec->ExceptionFlags |= EXCEPTION_UNWINDING | (end_frame ? 0 : EXCEPTION_EXIT_UNWIND);
TRACE( "code=%lx flags=%lx end_frame=%p target_ip=%p\n",
rec->ExceptionCode, rec->ExceptionFlags, end_frame, target_ip );
......@@ -824,7 +824,7 @@ void WINAPI RtlUnwindEx( PVOID end_frame, PVOID target_ip, EXCEPTION_RECORD *rec
{
ERR( "invalid frame %p (%p-%p)\n", (void *)dispatch.EstablisherFrame,
NtCurrentTeb()->Tib.StackLimit, NtCurrentTeb()->Tib.StackBase );
rec->ExceptionFlags |= EH_STACK_INVALID;
rec->ExceptionFlags |= EXCEPTION_STACK_INVALID;
break;
}
......@@ -835,7 +835,7 @@ void WINAPI RtlUnwindEx( PVOID end_frame, PVOID target_ip, EXCEPTION_RECORD *rec
ERR( "invalid end frame %p/%p\n", (void *)dispatch.EstablisherFrame, end_frame );
raise_status( STATUS_INVALID_UNWIND_TARGET, rec );
}
if (dispatch.EstablisherFrame == (ULONG64)end_frame) rec->ExceptionFlags |= EH_TARGET_UNWIND;
if (dispatch.EstablisherFrame == (ULONG64)end_frame) rec->ExceptionFlags |= EXCEPTION_TARGET_UNWIND;
if (call_unwind_handler( rec, &dispatch ) == ExceptionCollidedUnwind)
{
ULONG64 frame;
......@@ -847,10 +847,10 @@ void WINAPI RtlUnwindEx( PVOID end_frame, PVOID target_ip, EXCEPTION_RECORD *rec
RtlVirtualUnwind( UNW_FLAG_NHANDLER, dispatch.ImageBase,
dispatch.ControlPc, dispatch.FunctionEntry,
&new_context, NULL, &frame, NULL );
rec->ExceptionFlags |= EH_COLLIDED_UNWIND;
rec->ExceptionFlags |= EXCEPTION_COLLIDED_UNWIND;
goto unwind_done;
}
rec->ExceptionFlags &= ~EH_COLLIDED_UNWIND;
rec->ExceptionFlags &= ~EXCEPTION_COLLIDED_UNWIND;
}
else /* hack: call builtin handlers registered in the tib list */
{
......@@ -874,7 +874,7 @@ void WINAPI RtlUnwindEx( PVOID end_frame, PVOID target_ip, EXCEPTION_RECORD *rec
RtlVirtualUnwind( UNW_FLAG_NHANDLER, dispatch.ImageBase,
dispatch.ControlPc, dispatch.FunctionEntry,
&new_context, NULL, &frame, NULL );
rec->ExceptionFlags |= EH_COLLIDED_UNWIND;
rec->ExceptionFlags |= EXCEPTION_COLLIDED_UNWIND;
goto unwind_done;
}
teb_frame = __wine_pop_frame( teb_frame );
......@@ -907,7 +907,7 @@ EXCEPTION_DISPOSITION WINAPI __C_specific_handler( EXCEPTION_RECORD *rec,
TRACE( "%p %p %p %p\n", rec, frame, context, dispatch );
if (TRACE_ON(seh)) dump_scope_table( dispatch->ImageBase, table );
if (rec->ExceptionFlags & (EH_UNWINDING | EH_EXIT_UNWIND))
if (rec->ExceptionFlags & (EXCEPTION_UNWINDING | EXCEPTION_EXIT_UNWIND))
{
for (i = dispatch->ScopeIndex; i < table->Count; i++)
{
......@@ -918,7 +918,7 @@ EXCEPTION_DISPOSITION WINAPI __C_specific_handler( EXCEPTION_RECORD *rec,
if (table->ScopeRecord[i].JumpTarget) continue;
if (rec->ExceptionFlags & EH_TARGET_UNWIND &&
if (rec->ExceptionFlags & EXCEPTION_TARGET_UNWIND &&
dispatch->TargetIp >= dispatch->ImageBase + table->ScopeRecord[i].BeginAddress &&
dispatch->TargetIp < dispatch->ImageBase + table->ScopeRecord[i].EndAddress)
{
......
......@@ -838,7 +838,7 @@ static void segv_handler( int signal, siginfo_t *siginfo, void *sigcontext )
case 0xfb: /* __fastfail */
{
rec.ExceptionCode = STATUS_STACK_BUFFER_OVERRUN;
rec.ExceptionFlags = EH_NONCONTINUABLE;
rec.ExceptionFlags = EXCEPTION_NONCONTINUABLE;
rec.NumberParameters = 1;
rec.ExceptionInformation[0] = ctx.R0;
NtRaiseException( &rec, &ctx, FALSE );
......@@ -991,7 +991,7 @@ static void int_handler( int signal, siginfo_t *siginfo, void *sigcontext )
*/
static void abrt_handler( int signal, siginfo_t *siginfo, void *sigcontext )
{
EXCEPTION_RECORD rec = { EXCEPTION_WINE_ASSERTION, EH_NONCONTINUABLE };
EXCEPTION_RECORD rec = { EXCEPTION_WINE_ASSERTION, EXCEPTION_NONCONTINUABLE };
setup_exception( sigcontext, &rec );
}
......
......@@ -1097,7 +1097,7 @@ static void trap_handler( int signal, siginfo_t *siginfo, void *sigcontext )
*(ULONG *)PC_sig( context ) == 0xd43e0060UL) /* brk #0xf003 -> __fastfail */
{
rec.ExceptionCode = STATUS_STACK_BUFFER_OVERRUN;
rec.ExceptionFlags = EH_NONCONTINUABLE;
rec.ExceptionFlags = EXCEPTION_NONCONTINUABLE;
rec.NumberParameters = 1;
rec.ExceptionInformation[0] = ctx.X[0];
NtRaiseException( &rec, &ctx, FALSE );
......@@ -1193,7 +1193,7 @@ static void int_handler( int signal, siginfo_t *siginfo, void *sigcontext )
*/
static void abrt_handler( int signal, siginfo_t *siginfo, void *sigcontext )
{
EXCEPTION_RECORD rec = { EXCEPTION_WINE_ASSERTION, EH_NONCONTINUABLE };
EXCEPTION_RECORD rec = { EXCEPTION_WINE_ASSERTION, EXCEPTION_NONCONTINUABLE };
setup_exception( sigcontext, &rec );
}
......
......@@ -1753,7 +1753,7 @@ static BOOL handle_interrupt( unsigned int interrupt, ucontext_t *sigcontext, vo
case 0x29:
/* __fastfail: process state is corrupted */
rec->ExceptionCode = STATUS_STACK_BUFFER_OVERRUN;
rec->ExceptionFlags = EH_NONCONTINUABLE;
rec->ExceptionFlags = EXCEPTION_NONCONTINUABLE;
rec->NumberParameters = 1;
rec->ExceptionInformation[0] = context->Ecx;
NtRaiseException( rec, context, FALSE );
......@@ -2081,7 +2081,7 @@ static void int_handler( int signal, siginfo_t *siginfo, void *sigcontext )
*/
static void abrt_handler( int signal, siginfo_t *siginfo, void *sigcontext )
{
EXCEPTION_RECORD rec = { EXCEPTION_WINE_ASSERTION, EH_NONCONTINUABLE };
EXCEPTION_RECORD rec = { EXCEPTION_WINE_ASSERTION, EXCEPTION_NONCONTINUABLE };
setup_exception( sigcontext, &rec );
}
......
......@@ -1794,7 +1794,7 @@ static inline BOOL handle_interrupt( ucontext_t *sigcontext, EXCEPTION_RECORD *r
case 0x29:
/* __fastfail: process state is corrupted */
rec->ExceptionCode = STATUS_STACK_BUFFER_OVERRUN;
rec->ExceptionFlags = EH_NONCONTINUABLE;
rec->ExceptionFlags = EXCEPTION_NONCONTINUABLE;
rec->NumberParameters = 1;
rec->ExceptionInformation[0] = context->Rcx;
NtRaiseException( rec, context, FALSE );
......@@ -2117,7 +2117,7 @@ static void int_handler( int signal, siginfo_t *siginfo, void *sigcontext )
static void abrt_handler( int signal, siginfo_t *siginfo, void *sigcontext )
{
ucontext_t *ucontext = init_handler( sigcontext );
EXCEPTION_RECORD rec = { EXCEPTION_WINE_ASSERTION, EH_NONCONTINUABLE };
EXCEPTION_RECORD rec = { EXCEPTION_WINE_ASSERTION, EXCEPTION_NONCONTINUABLE };
setup_exception( ucontext, &rec );
}
......
......@@ -1545,7 +1545,7 @@ NTSTATUS WINAPI NtRaiseException( EXCEPTION_RECORD *rec, CONTEXT *context, BOOL
if (first_chance) return call_user_exception_dispatcher( rec, context );
if (rec->ExceptionFlags & EH_STACK_INVALID)
if (rec->ExceptionFlags & EXCEPTION_STACK_INVALID)
ERR_(seh)("Exception frame is not in stack limits => unable to dispatch exception.\n");
else if (rec->ExceptionCode == STATUS_NONCONTINUABLE_EXCEPTION)
ERR_(seh)("Process attempted to continue execution after noncontinuable exception.\n");
......
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