include: Added definitions for the fault address exception information.
This commit is contained in:
parent
530e765035
commit
a27d0aa4e9
|
@ -117,8 +117,9 @@ static int format_exception_msg( const EXCEPTION_POINTERS *ptr, char *buffer, in
|
||||||
case EXCEPTION_ACCESS_VIOLATION:
|
case EXCEPTION_ACCESS_VIOLATION:
|
||||||
if (rec->NumberParameters == 2)
|
if (rec->NumberParameters == 2)
|
||||||
len = snprintf( buffer, size, "Unhandled page fault on %s access to 0x%08lx",
|
len = snprintf( buffer, size, "Unhandled page fault on %s access to 0x%08lx",
|
||||||
rec->ExceptionInformation[0] ? "write" : "read",
|
rec->ExceptionInformation[0] == EXCEPTION_WRITE_FAULT ? "write" :
|
||||||
rec->ExceptionInformation[1]);
|
rec->ExceptionInformation[0] == EXCEPTION_EXECUTE_FAULT ? "execute" : "read",
|
||||||
|
rec->ExceptionInformation[1]);
|
||||||
else
|
else
|
||||||
len = snprintf( buffer, size, "Unhandled page fault");
|
len = snprintf( buffer, size, "Unhandled page fault");
|
||||||
break;
|
break;
|
||||||
|
@ -448,11 +449,11 @@ LONG WINAPI UnhandledExceptionFilter(PEXCEPTION_POINTERS epointers)
|
||||||
{
|
{
|
||||||
switch(rec->ExceptionInformation[0])
|
switch(rec->ExceptionInformation[0])
|
||||||
{
|
{
|
||||||
case 1: /* write access */
|
case EXCEPTION_WRITE_FAULT:
|
||||||
if (check_resource_write( (void *)rec->ExceptionInformation[1] ))
|
if (check_resource_write( (void *)rec->ExceptionInformation[1] ))
|
||||||
return EXCEPTION_CONTINUE_EXECUTION;
|
return EXCEPTION_CONTINUE_EXECUTION;
|
||||||
break;
|
break;
|
||||||
case 8: /* execute access */
|
case EXCEPTION_EXECUTE_FAULT:
|
||||||
if (check_no_exec( (void *)rec->ExceptionInformation[1] ))
|
if (check_no_exec( (void *)rec->ExceptionInformation[1] ))
|
||||||
return EXCEPTION_CONTINUE_EXECUTION;
|
return EXCEPTION_CONTINUE_EXECUTION;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -970,7 +970,8 @@ static void WINAPI raise_segv_exception( EXCEPTION_RECORD *rec, CONTEXT *context
|
||||||
case EXCEPTION_ACCESS_VIOLATION:
|
case EXCEPTION_ACCESS_VIOLATION:
|
||||||
if (rec->NumberParameters == 2)
|
if (rec->NumberParameters == 2)
|
||||||
{
|
{
|
||||||
if ((rec->ExceptionInformation[0] == 8) && check_atl_thunk( rec, context )) goto done;
|
if (rec->ExceptionInformation[0] == EXCEPTION_EXECUTE_FAULT && check_atl_thunk( rec, context ))
|
||||||
|
goto done;
|
||||||
rec->ExceptionCode = VIRTUAL_HandleFault( (void *)rec->ExceptionInformation[1] );
|
rec->ExceptionCode = VIRTUAL_HandleFault( (void *)rec->ExceptionInformation[1] );
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -4359,7 +4359,7 @@ static LONG CALLBACK X11DRV_DIB_FaultHandler( PEXCEPTION_POINTERS ep )
|
||||||
if (!found) return EXCEPTION_CONTINUE_SEARCH;
|
if (!found) return EXCEPTION_CONTINUE_SEARCH;
|
||||||
|
|
||||||
X11DRV_DIB_Lock( physBitmap, DIB_Status_None, FALSE );
|
X11DRV_DIB_Lock( physBitmap, DIB_Status_None, FALSE );
|
||||||
if (ep->ExceptionRecord->ExceptionInformation[0]) {
|
if (ep->ExceptionRecord->ExceptionInformation[0] == EXCEPTION_WRITE_FAULT) {
|
||||||
/* the app tried to write the DIB bits */
|
/* the app tried to write the DIB bits */
|
||||||
X11DRV_DIB_Coerce( physBitmap, DIB_Status_AppMod, FALSE );
|
X11DRV_DIB_Coerce( physBitmap, DIB_Status_AppMod, FALSE );
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -714,6 +714,10 @@ typedef struct _CONTEXT86
|
||||||
|
|
||||||
typedef CONTEXT86 CONTEXT;
|
typedef CONTEXT86 CONTEXT;
|
||||||
|
|
||||||
|
#define EXCEPTION_READ_FAULT 0
|
||||||
|
#define EXCEPTION_WRITE_FAULT 1
|
||||||
|
#define EXCEPTION_EXECUTE_FAULT 8
|
||||||
|
|
||||||
#endif /* __i386__ */
|
#endif /* __i386__ */
|
||||||
|
|
||||||
typedef struct _LDT_ENTRY {
|
typedef struct _LDT_ENTRY {
|
||||||
|
@ -754,6 +758,10 @@ typedef struct _LDT_ENTRY {
|
||||||
#define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_INTEGER | CONTEXT_FLOATING_POINT)
|
#define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_INTEGER | CONTEXT_FLOATING_POINT)
|
||||||
#define CONTEXT_ALL (CONTEXT_CONTROL | CONTEXT_INTEGER | CONTEXT_SEGMENTS | CONTEXT_FLOATING_POINT | CONTEXT_DEBUG_REGISTERS)
|
#define CONTEXT_ALL (CONTEXT_CONTROL | CONTEXT_INTEGER | CONTEXT_SEGMENTS | CONTEXT_FLOATING_POINT | CONTEXT_DEBUG_REGISTERS)
|
||||||
|
|
||||||
|
#define EXCEPTION_READ_FAULT 0
|
||||||
|
#define EXCEPTION_WRITE_FAULT 1
|
||||||
|
#define EXCEPTION_EXECUTE_FAULT 8
|
||||||
|
|
||||||
typedef struct DECLSPEC_ALIGN(16) _M128A {
|
typedef struct DECLSPEC_ALIGN(16) _M128A {
|
||||||
ULONGLONG Low;
|
ULONGLONG Low;
|
||||||
LONGLONG High;
|
LONGLONG High;
|
||||||
|
@ -877,6 +885,10 @@ typedef struct DECLSPEC_ALIGN(16) _CONTEXT {
|
||||||
#define CONTEXT_INTEGER (CONTEXT_ALPHA | 0x00000004L)
|
#define CONTEXT_INTEGER (CONTEXT_ALPHA | 0x00000004L)
|
||||||
#define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_FLOATING_POINT | CONTEXT_INTEGER)
|
#define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_FLOATING_POINT | CONTEXT_INTEGER)
|
||||||
|
|
||||||
|
#define EXCEPTION_READ_FAULT 0
|
||||||
|
#define EXCEPTION_WRITE_FAULT 1
|
||||||
|
#define EXCEPTION_EXECUTE_FAULT 8
|
||||||
|
|
||||||
typedef struct _CONTEXT
|
typedef struct _CONTEXT
|
||||||
{
|
{
|
||||||
/* selected by CONTEXT_FLOATING_POINT */
|
/* selected by CONTEXT_FLOATING_POINT */
|
||||||
|
@ -973,6 +985,10 @@ typedef struct _CONTEXT
|
||||||
|
|
||||||
#define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_INTEGER)
|
#define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_INTEGER)
|
||||||
|
|
||||||
|
#define EXCEPTION_READ_FAULT 0
|
||||||
|
#define EXCEPTION_WRITE_FAULT 1
|
||||||
|
#define EXCEPTION_EXECUTE_FAULT 8
|
||||||
|
|
||||||
typedef struct _CONTEXT {
|
typedef struct _CONTEXT {
|
||||||
/* The flags values within this flag control the contents of
|
/* The flags values within this flag control the contents of
|
||||||
a CONTEXT record.
|
a CONTEXT record.
|
||||||
|
@ -1028,6 +1044,10 @@ typedef struct _CONTEXT {
|
||||||
|
|
||||||
#define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_FLOATING_POINT | CONTEXT_INTEGER)
|
#define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_FLOATING_POINT | CONTEXT_INTEGER)
|
||||||
|
|
||||||
|
#define EXCEPTION_READ_FAULT 0
|
||||||
|
#define EXCEPTION_WRITE_FAULT 1
|
||||||
|
#define EXCEPTION_EXECUTE_FAULT 8
|
||||||
|
|
||||||
typedef struct _CONTEXT
|
typedef struct _CONTEXT
|
||||||
{
|
{
|
||||||
DWORD Argument[4];
|
DWORD Argument[4];
|
||||||
|
@ -1123,6 +1143,10 @@ typedef struct _CONTEXT
|
||||||
#define CONTEXT_DEBUG_REGISTERS 0x0008
|
#define CONTEXT_DEBUG_REGISTERS 0x0008
|
||||||
#define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_FLOATING_POINT | CONTEXT_INTEGER)
|
#define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_FLOATING_POINT | CONTEXT_INTEGER)
|
||||||
|
|
||||||
|
#define EXCEPTION_READ_FAULT 0
|
||||||
|
#define EXCEPTION_WRITE_FAULT 1
|
||||||
|
#define EXCEPTION_EXECUTE_FAULT 8
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
/* These are selected by CONTEXT_FLOATING_POINT */
|
/* These are selected by CONTEXT_FLOATING_POINT */
|
||||||
|
@ -1267,6 +1291,10 @@ typedef struct _STACK_FRAME_HEADER
|
||||||
|
|
||||||
#define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_FLOATING_POINT | CONTEXT_INTEGER)
|
#define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_FLOATING_POINT | CONTEXT_INTEGER)
|
||||||
|
|
||||||
|
#define EXCEPTION_READ_FAULT 0
|
||||||
|
#define EXCEPTION_WRITE_FAULT 1
|
||||||
|
#define EXCEPTION_EXECUTE_FAULT 8
|
||||||
|
|
||||||
typedef struct _CONTEXT
|
typedef struct _CONTEXT
|
||||||
{
|
{
|
||||||
DWORD ContextFlags;
|
DWORD ContextFlags;
|
||||||
|
|
|
@ -307,7 +307,8 @@ static DWORD dbg_handle_exception(const EXCEPTION_RECORD* rec, BOOL first_chance
|
||||||
case EXCEPTION_ACCESS_VIOLATION:
|
case EXCEPTION_ACCESS_VIOLATION:
|
||||||
if (rec->NumberParameters == 2)
|
if (rec->NumberParameters == 2)
|
||||||
dbg_printf("page fault on %s access to 0x%08lx",
|
dbg_printf("page fault on %s access to 0x%08lx",
|
||||||
rec->ExceptionInformation[0] ? "write" : "read",
|
rec->ExceptionInformation[0] == EXCEPTION_WRITE_FAULT ? "write" :
|
||||||
|
rec->ExceptionInformation[0] == EXCEPTION_EXECUTE_FAULT ? "execute" : "read",
|
||||||
rec->ExceptionInformation[1]);
|
rec->ExceptionInformation[1]);
|
||||||
else
|
else
|
||||||
dbg_printf("page fault");
|
dbg_printf("page fault");
|
||||||
|
|
Loading…
Reference in New Issue