Renamed EXCEPTION_FRAME to EXCEPTION_REGISTRATION_RECORD since that

seems to be the official name.
This commit is contained in:
Alexandre Julliard 2003-08-28 03:07:56 +00:00
parent 54acf626c5
commit ee106783d0
10 changed files with 67 additions and 68 deletions

View file

@ -157,8 +157,8 @@ static BOOL fix_selector( CONTEXT *context )
*
* Handler for exceptions occurring in 16-bit code.
*/
static DWORD call16_handler( EXCEPTION_RECORD *record, EXCEPTION_FRAME *frame,
CONTEXT *context, EXCEPTION_FRAME **pdispatcher )
static DWORD call16_handler( EXCEPTION_RECORD *record, EXCEPTION_REGISTRATION_RECORD *frame,
CONTEXT *context, EXCEPTION_REGISTRATION_RECORD **pdispatcher )
{
if (record->ExceptionFlags & (EH_UNWINDING | EH_EXIT_UNWIND))
{

View file

@ -39,8 +39,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(seh);
#ifdef __i386__ /* CxxFrameHandler is not supported on non-i386 */
static DWORD cxx_frame_handler( PEXCEPTION_RECORD rec, cxx_exception_frame* frame,
PCONTEXT exc_context, EXCEPTION_FRAME** dispatch,
cxx_function_descr *descr, EXCEPTION_FRAME* nested_frame,
PCONTEXT exc_context, EXCEPTION_REGISTRATION_RECORD** dispatch,
cxx_function_descr *descr, EXCEPTION_REGISTRATION_RECORD* nested_frame,
int nested_trylevel, CONTEXT86 *context );
/* call a function with a given ebp */
@ -226,16 +226,16 @@ static void cxx_local_unwind( cxx_exception_frame* frame, cxx_function_descr *de
/* exception frame for nested exceptions in catch block */
struct catch_func_nested_frame
{
EXCEPTION_FRAME frame; /* standard exception frame */
EXCEPTION_RECORD *prev_rec; /* previous record to restore in thread data */
cxx_exception_frame *cxx_frame; /* frame of parent exception */
cxx_function_descr *descr; /* descriptor of parent exception */
int trylevel; /* current try level */
EXCEPTION_REGISTRATION_RECORD frame; /* standard exception frame */
EXCEPTION_RECORD *prev_rec; /* previous record to restore in thread data */
cxx_exception_frame *cxx_frame; /* frame of parent exception */
cxx_function_descr *descr; /* descriptor of parent exception */
int trylevel; /* current try level */
};
/* handler for exceptions happening while calling a catch function */
static DWORD catch_function_nested_handler( EXCEPTION_RECORD *rec, EXCEPTION_FRAME *frame,
CONTEXT *context, EXCEPTION_FRAME **dispatcher )
static DWORD catch_function_nested_handler( EXCEPTION_RECORD *rec, EXCEPTION_REGISTRATION_RECORD *frame,
CONTEXT *context, EXCEPTION_REGISTRATION_RECORD **dispatcher )
{
struct catch_func_nested_frame *nested_frame = (struct catch_func_nested_frame *)frame;
@ -323,8 +323,8 @@ inline static void *call_catch_block( PEXCEPTION_RECORD rec, cxx_exception_frame
* Implementation of __CxxFrameHandler.
*/
static DWORD cxx_frame_handler( PEXCEPTION_RECORD rec, cxx_exception_frame* frame,
PCONTEXT exc_context, EXCEPTION_FRAME** dispatch,
cxx_function_descr *descr, EXCEPTION_FRAME* nested_frame,
PCONTEXT exc_context, EXCEPTION_REGISTRATION_RECORD** dispatch,
cxx_function_descr *descr, EXCEPTION_REGISTRATION_RECORD* nested_frame,
int nested_trylevel, CONTEXT86 *context )
{
cxx_exception_type *exc_type;
@ -379,8 +379,8 @@ static DWORD cxx_frame_handler( PEXCEPTION_RECORD rec, cxx_exception_frame* fram
/*********************************************************************
* __CxxFrameHandler (MSVCRT.@)
*/
void __CxxFrameHandler( PEXCEPTION_RECORD rec, EXCEPTION_FRAME* frame,
PCONTEXT exc_context, EXCEPTION_FRAME** dispatch,
void __CxxFrameHandler( PEXCEPTION_RECORD rec, EXCEPTION_REGISTRATION_RECORD* frame,
PCONTEXT exc_context, EXCEPTION_REGISTRATION_RECORD** dispatch,
CONTEXT86 *context )
{
cxx_function_descr *descr = (cxx_function_descr *)context->Eax;

View file

@ -37,9 +37,9 @@ typedef struct __type_info
/* the exception frame used by CxxFrameHandler */
typedef struct __cxx_exception_frame
{
EXCEPTION_FRAME frame; /* the standard exception frame */
int trylevel;
DWORD ebp;
EXCEPTION_REGISTRATION_RECORD frame; /* the standard exception frame */
int trylevel;
DWORD ebp;
} cxx_exception_frame;
/* info about a single catch {} block */
@ -106,9 +106,9 @@ typedef struct __cxx_type_info_table
} cxx_type_info_table;
typedef DWORD (*cxx_exc_custom_handler)( PEXCEPTION_RECORD, cxx_exception_frame*,
PCONTEXT, struct __EXCEPTION_FRAME**,
PCONTEXT, EXCEPTION_REGISTRATION_RECORD**,
cxx_function_descr*, int nested_trylevel,
EXCEPTION_FRAME *nested_frame, DWORD unknown3 );
EXCEPTION_REGISTRATION_RECORD *nested_frame, DWORD unknown3 );
/* type information for an exception object */
typedef struct __cxx_exception_type

View file

@ -53,8 +53,8 @@ typedef struct _SCOPETABLE
typedef struct _MSVCRT_EXCEPTION_FRAME
{
EXCEPTION_FRAME *prev;
void (*handler)(PEXCEPTION_RECORD, PEXCEPTION_FRAME,
EXCEPTION_REGISTRATION_RECORD *prev;
void (*handler)(PEXCEPTION_RECORD, PEXCEPTION_REGISTRATION_RECORD,
PCONTEXT, PEXCEPTION_RECORD);
PSCOPETABLE scopetable;
int trylevel;
@ -83,9 +83,9 @@ inline static DWORD call_filter( void *func, void *arg, void *ebp )
#endif
static DWORD MSVCRT_nested_handler(PEXCEPTION_RECORD rec,
struct __EXCEPTION_FRAME* frame,
EXCEPTION_REGISTRATION_RECORD* frame,
PCONTEXT context WINE_UNUSED,
struct __EXCEPTION_FRAME** dispatch)
EXCEPTION_REGISTRATION_RECORD** dispatch)
{
if (rec->ExceptionFlags & 0x6)
return ExceptionContinueSearch;
@ -123,7 +123,7 @@ __ASM_GLOBAL_FUNC(_EH_prolog,
/*******************************************************************
* _global_unwind2 (MSVCRT.@)
*/
void _global_unwind2(PEXCEPTION_FRAME frame)
void _global_unwind2(PEXCEPTION_REGISTRATION_RECORD frame)
{
TRACE("(%p)\n",frame);
RtlUnwind( frame, 0, 0, 0 );
@ -135,7 +135,7 @@ void _global_unwind2(PEXCEPTION_FRAME frame)
void _local_unwind2(MSVCRT_EXCEPTION_FRAME* frame, int trylevel)
{
MSVCRT_EXCEPTION_FRAME *curframe = frame;
EXCEPTION_FRAME reg;
EXCEPTION_REGISTRATION_RECORD reg;
TRACE("(%p,%d,%d)\n",frame, frame->trylevel, trylevel);
@ -165,9 +165,9 @@ void _local_unwind2(MSVCRT_EXCEPTION_FRAME* frame, int trylevel)
* _except_handler2 (MSVCRT.@)
*/
int _except_handler2(PEXCEPTION_RECORD rec,
PEXCEPTION_FRAME frame,
PEXCEPTION_REGISTRATION_RECORD frame,
PCONTEXT context,
PEXCEPTION_FRAME* dispatcher)
PEXCEPTION_REGISTRATION_RECORD* dispatcher)
{
FIXME("exception %lx flags=%lx at %p handler=%p %p %p stub\n",
rec->ExceptionCode, rec->ExceptionFlags, rec->ExceptionAddress,
@ -227,7 +227,7 @@ int _except_handler3(PEXCEPTION_RECORD rec,
if (retval == EXCEPTION_EXECUTE_HANDLER)
{
/* Unwind all higher frames, this one will handle the exception */
_global_unwind2((PEXCEPTION_FRAME)frame);
_global_unwind2((PEXCEPTION_REGISTRATION_RECORD)frame);
_local_unwind2(frame, trylevel);
/* Set our trylevel to the enclosing block, and call the __finally
@ -343,7 +343,7 @@ void _MSVCRT_longjmp(_JUMP_BUFFER *jmp, int retval, CONTEXT86* context)
TRACE("cur_frame=%lx\n",cur_frame);
if (cur_frame != jmp->Registration)
_global_unwind2((PEXCEPTION_FRAME)jmp->Registration);
_global_unwind2((PEXCEPTION_REGISTRATION_RECORD)jmp->Registration);
if (jmp->Registration)
{

View file

@ -37,8 +37,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(seh);
/* Exception record for handling exceptions happening inside exception handlers */
typedef struct
{
EXCEPTION_FRAME frame;
EXCEPTION_FRAME *prevFrame;
EXCEPTION_REGISTRATION_RECORD frame;
EXCEPTION_REGISTRATION_RECORD *prevFrame;
} EXC_NESTED_FRAME;
#ifdef __i386__
@ -52,7 +52,7 @@ typedef struct
#endif
void WINAPI EXC_RtlRaiseException( PEXCEPTION_RECORD, PCONTEXT );
void WINAPI EXC_RtlUnwind( PEXCEPTION_FRAME, LPVOID,
void WINAPI EXC_RtlUnwind( PEXCEPTION_REGISTRATION_RECORD, LPVOID,
PEXCEPTION_RECORD, DWORD, PCONTEXT );
void WINAPI EXC_NtRaiseException( PEXCEPTION_RECORD, PCONTEXT,
BOOL, PCONTEXT );
@ -62,8 +62,8 @@ void WINAPI EXC_NtRaiseException( PEXCEPTION_RECORD, PCONTEXT,
*
* Handler for exceptions happening inside a handler.
*/
static DWORD EXC_RaiseHandler( EXCEPTION_RECORD *rec, EXCEPTION_FRAME *frame,
CONTEXT *context, EXCEPTION_FRAME **dispatcher )
static DWORD EXC_RaiseHandler( EXCEPTION_RECORD *rec, EXCEPTION_REGISTRATION_RECORD *frame,
CONTEXT *context, EXCEPTION_REGISTRATION_RECORD **dispatcher )
{
if (rec->ExceptionFlags & (EH_UNWINDING | EH_EXIT_UNWIND))
return ExceptionContinueSearch;
@ -78,8 +78,8 @@ static DWORD EXC_RaiseHandler( EXCEPTION_RECORD *rec, EXCEPTION_FRAME *frame,
*
* Handler for exceptions happening inside an unwind handler.
*/
static DWORD EXC_UnwindHandler( EXCEPTION_RECORD *rec, EXCEPTION_FRAME *frame,
CONTEXT *context, EXCEPTION_FRAME **dispatcher )
static DWORD EXC_UnwindHandler( EXCEPTION_RECORD *rec, EXCEPTION_REGISTRATION_RECORD *frame,
CONTEXT *context, EXCEPTION_REGISTRATION_RECORD **dispatcher )
{
if (!(rec->ExceptionFlags & (EH_UNWINDING | EH_EXIT_UNWIND)))
return ExceptionContinueSearch;
@ -97,8 +97,8 @@ static DWORD EXC_UnwindHandler( EXCEPTION_RECORD *rec, EXCEPTION_FRAME *frame,
* 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( EXCEPTION_RECORD *record, EXCEPTION_FRAME *frame,
CONTEXT *context, EXCEPTION_FRAME **dispatcher,
static DWORD EXC_CallHandler( EXCEPTION_RECORD *record, EXCEPTION_REGISTRATION_RECORD *frame,
CONTEXT *context, EXCEPTION_REGISTRATION_RECORD **dispatcher,
PEXCEPTION_HANDLER handler, PEXCEPTION_HANDLER nested_handler)
{
EXC_NESTED_FRAME newframe;
@ -179,7 +179,7 @@ static void EXC_DefaultHandling( EXCEPTION_RECORD *rec, CONTEXT *context )
DEFINE_REGS_ENTRYPOINT_1( RtlRaiseException, EXC_RtlRaiseException, EXCEPTION_RECORD * );
void WINAPI EXC_RtlRaiseException( EXCEPTION_RECORD *rec, CONTEXT *context )
{
PEXCEPTION_FRAME frame, dispatch, nested_frame;
PEXCEPTION_REGISTRATION_RECORD frame, dispatch, nested_frame;
EXCEPTION_RECORD newrec;
DWORD res, c;
@ -195,7 +195,7 @@ void WINAPI EXC_RtlRaiseException( EXCEPTION_RECORD *rec, CONTEXT *context )
frame = NtCurrentTeb()->except;
nested_frame = NULL;
while (frame != (PEXCEPTION_FRAME)0xFFFFFFFF)
while (frame != (PEXCEPTION_REGISTRATION_RECORD)~0UL)
{
/* Check frame address */
if (((void*)frame < NtCurrentTeb()->stack_low) ||
@ -250,12 +250,12 @@ void WINAPI EXC_RtlRaiseException( EXCEPTION_RECORD *rec, CONTEXT *context )
*/
DEFINE_REGS_ENTRYPOINT_4( RtlUnwind, EXC_RtlUnwind,
PVOID, PVOID, PEXCEPTION_RECORD, PVOID );
void WINAPI EXC_RtlUnwind( PEXCEPTION_FRAME pEndFrame, LPVOID unusedEip,
void WINAPI EXC_RtlUnwind( PEXCEPTION_REGISTRATION_RECORD pEndFrame, LPVOID unusedEip,
PEXCEPTION_RECORD pRecord, DWORD returnEax,
CONTEXT *context )
{
EXCEPTION_RECORD record, newrec;
PEXCEPTION_FRAME frame, dispatch;
PEXCEPTION_REGISTRATION_RECORD frame, dispatch;
#ifdef __i386__
context->Eax = returnEax;
@ -278,7 +278,7 @@ void WINAPI EXC_RtlUnwind( PEXCEPTION_FRAME pEndFrame, LPVOID unusedEip,
/* get chain of exception frames */
frame = NtCurrentTeb()->except;
while ((frame != (PEXCEPTION_FRAME)0xffffffff) && (frame != pEndFrame))
while ((frame != (PEXCEPTION_REGISTRATION_RECORD)~0UL) && (frame != pEndFrame))
{
/* Check frame address */
if (pEndFrame && (frame > pEndFrame))
@ -357,8 +357,8 @@ void WINAPI RtlRaiseStatus( NTSTATUS status )
*
* Exception handler for exception blocks declared in Wine code.
*/
DWORD __wine_exception_handler( EXCEPTION_RECORD *record, EXCEPTION_FRAME *frame,
CONTEXT *context, LPVOID pdispatcher )
DWORD __wine_exception_handler( EXCEPTION_RECORD *record, EXCEPTION_REGISTRATION_RECORD *frame,
CONTEXT *context, EXCEPTION_REGISTRATION_RECORD **pdispatcher )
{
__WINE_FRAME *wine_frame = (__WINE_FRAME *)frame;
@ -397,8 +397,8 @@ DWORD __wine_exception_handler( EXCEPTION_RECORD *record, EXCEPTION_FRAME *frame
*
* Exception handler for try/finally blocks declared in Wine code.
*/
DWORD __wine_finally_handler( EXCEPTION_RECORD *record, EXCEPTION_FRAME *frame,
CONTEXT *context, LPVOID pdispatcher )
DWORD __wine_finally_handler( EXCEPTION_RECORD *record, EXCEPTION_REGISTRATION_RECORD *frame,
CONTEXT *context, EXCEPTION_REGISTRATION_RECORD **pdispatcher )
{
if (record->ExceptionFlags & (EH_UNWINDING | EH_EXIT_UNWIND))
{

View file

@ -34,7 +34,7 @@ typedef struct _STACK32FRAME
{
DWORD restore_addr; /* 00 return address for restoring code selector */
DWORD codeselector; /* 04 code selector to restore */
EXCEPTION_FRAME frame; /* 08 Exception frame */
EXCEPTION_REGISTRATION_RECORD frame; /* 08 Exception frame */
SEGPTR frame16; /* 10 16-bit frame from last CallFrom16() */
DWORD edi; /* 14 saved registers */
DWORD esi; /* 18 */

View file

@ -24,7 +24,6 @@
#include "winternl.h"
#include "wine/windef16.h"
struct __EXCEPTION_FRAME;
struct _SECURITY_ATTRIBUTES;
struct tagSYSLEVEL;
struct server_buffer_info;
@ -55,7 +54,7 @@ struct debug_info
typedef struct _TEB
{
/* start of NT_TIB */
struct __EXCEPTION_FRAME *except; /* 12- 00 Head of exception handling chain */
EXCEPTION_REGISTRATION_RECORD *except; /* 12- 00 Head of exception handling chain */
void *stack_top; /* 12- 04 Top of thread stack */
void *stack_low; /* 12- 08 Stack low-water mark */
HTASK16 htask16; /* 1-- 0c Win16 task handle */

View file

@ -86,7 +86,7 @@
__wine_pop_frame( &__f.frame ); \
break; \
} else { \
__f.frame.Handler = (PEXCEPTION_HANDLER)__wine_exception_handler; \
__f.frame.Handler = __wine_exception_handler; \
__f.u.filter = (func); \
__wine_push_frame( &__f.frame ); \
if (setjmp( __f.jmp)) { \
@ -107,7 +107,7 @@
(func)(1); \
break; \
} else { \
__f.frame.Handler = (PEXCEPTION_HANDLER)__wine_finally_handler; \
__f.frame.Handler = __wine_finally_handler; \
__f.u.finally_func = (func); \
__wine_push_frame( &__f.frame ); \
__first = 0; \
@ -127,7 +127,7 @@ typedef void (CALLBACK *__WINE_FINALLY)(BOOL);
typedef struct __tagWINE_FRAME
{
EXCEPTION_FRAME frame;
EXCEPTION_REGISTRATION_RECORD frame;
union
{
/* exception data */
@ -141,17 +141,17 @@ typedef struct __tagWINE_FRAME
const struct __tagWINE_FRAME *ExceptionRecord;
} __WINE_FRAME;
extern DWORD __wine_exception_handler( PEXCEPTION_RECORD record, EXCEPTION_FRAME *frame,
CONTEXT *context, LPVOID pdispatcher );
extern DWORD __wine_finally_handler( PEXCEPTION_RECORD record, EXCEPTION_FRAME *frame,
CONTEXT *context, LPVOID pdispatcher );
extern DWORD __wine_exception_handler( PEXCEPTION_RECORD record, EXCEPTION_REGISTRATION_RECORD *frame,
CONTEXT *context, EXCEPTION_REGISTRATION_RECORD **pdispatcher );
extern DWORD __wine_finally_handler( PEXCEPTION_RECORD record, EXCEPTION_REGISTRATION_RECORD *frame,
CONTEXT *context, EXCEPTION_REGISTRATION_RECORD **pdispatcher );
#endif /* USE_COMPILER_EXCEPTIONS */
static inline EXCEPTION_FRAME * WINE_UNUSED __wine_push_frame( EXCEPTION_FRAME *frame )
static inline EXCEPTION_REGISTRATION_RECORD *__wine_push_frame( EXCEPTION_REGISTRATION_RECORD *frame )
{
#if defined(__GNUC__) && defined(__i386__)
EXCEPTION_FRAME *prev;
EXCEPTION_REGISTRATION_RECORD *prev;
__asm__ __volatile__(".byte 0x64\n\tmovl (0),%0"
"\n\tmovl %0,(%1)"
"\n\t.byte 0x64\n\tmovl %1,(0)"
@ -165,7 +165,7 @@ static inline EXCEPTION_FRAME * WINE_UNUSED __wine_push_frame( EXCEPTION_FRAME *
#endif
}
static inline EXCEPTION_FRAME * WINE_UNUSED __wine_pop_frame( EXCEPTION_FRAME *frame )
static inline EXCEPTION_REGISTRATION_RECORD *__wine_pop_frame( EXCEPTION_REGISTRATION_RECORD *frame )
{
#if defined(__GNUC__) && defined(__i386__)
__asm__ __volatile__(".byte 0x64\n\tmovl %0,(0)"

View file

@ -1570,16 +1570,16 @@ typedef struct _EXCEPTION_POINTERS
* larger exception frames for their own use.
*/
struct __EXCEPTION_FRAME;
struct _EXCEPTION_REGISTRATION_RECORD;
typedef DWORD (*PEXCEPTION_HANDLER)(PEXCEPTION_RECORD,struct __EXCEPTION_FRAME*,
PCONTEXT,struct __EXCEPTION_FRAME **);
typedef DWORD (*PEXCEPTION_HANDLER)(PEXCEPTION_RECORD,struct _EXCEPTION_REGISTRATION_RECORD*,
PCONTEXT,struct _EXCEPTION_REGISTRATION_RECORD **);
typedef struct __EXCEPTION_FRAME
typedef struct _EXCEPTION_REGISTRATION_RECORD
{
struct __EXCEPTION_FRAME *Prev;
struct _EXCEPTION_REGISTRATION_RECORD *Prev;
PEXCEPTION_HANDLER Handler;
} EXCEPTION_FRAME, *PEXCEPTION_FRAME;
} EXCEPTION_REGISTRATION_RECORD, *PEXCEPTION_REGISTRATION_RECORD;
/*
* function pointer to a exception filter

View file

@ -570,7 +570,7 @@ void DEBUG_WalkExceptions(DWORD tid)
while (next_frame != (void *)-1)
{
EXCEPTION_FRAME frame;
EXCEPTION_REGISTRATION_RECORD frame;
DEBUG_Printf( DBG_CHN_MESG, "%p: ", next_frame );
if (!DEBUG_READ_MEM(next_frame, &frame, sizeof(frame)))