ntdll: Store extended FPU state and debug registers in RtlRaiseException().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
edbdec441b
commit
20a2cc9751
|
@ -2534,7 +2534,16 @@ NTSTATUS WINAPI NtRaiseException( EXCEPTION_RECORD *rec, CONTEXT *context, BOOL
|
||||||
void raise_exception_full_context( EXCEPTION_RECORD *rec, CONTEXT *context, BOOL first_chance )
|
void raise_exception_full_context( EXCEPTION_RECORD *rec, CONTEXT *context, BOOL first_chance )
|
||||||
{
|
{
|
||||||
save_fpu( context );
|
save_fpu( context );
|
||||||
/* FIXME: extended registers, debug registers */
|
save_fpux( context );
|
||||||
|
/* FIXME: xstate */
|
||||||
|
context->Dr0 = x86_thread_data()->dr0;
|
||||||
|
context->Dr1 = x86_thread_data()->dr1;
|
||||||
|
context->Dr2 = x86_thread_data()->dr2;
|
||||||
|
context->Dr3 = x86_thread_data()->dr3;
|
||||||
|
context->Dr6 = x86_thread_data()->dr6;
|
||||||
|
context->Dr7 = x86_thread_data()->dr7;
|
||||||
|
context->ContextFlags |= CONTEXT_DEBUG_REGISTERS;
|
||||||
|
|
||||||
RtlRaiseStatus( NtRaiseException( rec, context, first_chance ));
|
RtlRaiseStatus( NtRaiseException( rec, context, first_chance ));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -400,6 +400,9 @@ static DWORD rtlraiseexception_handler( EXCEPTION_RECORD *rec, EXCEPTION_REGISTR
|
||||||
ok(rec->ExceptionAddress == (char *)code_mem + 0xb, "ExceptionAddress at %p instead of %p\n",
|
ok(rec->ExceptionAddress == (char *)code_mem + 0xb, "ExceptionAddress at %p instead of %p\n",
|
||||||
rec->ExceptionAddress, (char *)code_mem + 0xb);
|
rec->ExceptionAddress, (char *)code_mem + 0xb);
|
||||||
|
|
||||||
|
ok( context->ContextFlags == CONTEXT_ALL || context->ContextFlags == (CONTEXT_ALL | CONTEXT_XSTATE),
|
||||||
|
"wrong context flags %x\n", context->ContextFlags );
|
||||||
|
|
||||||
/* check that context.Eip is fixed up only for EXCEPTION_BREAKPOINT
|
/* check that context.Eip is fixed up only for EXCEPTION_BREAKPOINT
|
||||||
* even if raised by RtlRaiseException
|
* even if raised by RtlRaiseException
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -969,6 +969,7 @@ typedef struct _CONTEXT
|
||||||
#define CONTEXT_FLOATING_POINT (CONTEXT_i386 | 0x0008) /* 387 state */
|
#define CONTEXT_FLOATING_POINT (CONTEXT_i386 | 0x0008) /* 387 state */
|
||||||
#define CONTEXT_DEBUG_REGISTERS (CONTEXT_i386 | 0x0010) /* DB 0-3,6,7 */
|
#define CONTEXT_DEBUG_REGISTERS (CONTEXT_i386 | 0x0010) /* DB 0-3,6,7 */
|
||||||
#define CONTEXT_EXTENDED_REGISTERS (CONTEXT_i386 | 0x0020)
|
#define CONTEXT_EXTENDED_REGISTERS (CONTEXT_i386 | 0x0020)
|
||||||
|
#define CONTEXT_XSTATE (CONTEXT_i386 | 0x0040)
|
||||||
#define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_INTEGER | CONTEXT_SEGMENTS)
|
#define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_INTEGER | CONTEXT_SEGMENTS)
|
||||||
#define CONTEXT_ALL (CONTEXT_CONTROL | CONTEXT_INTEGER | CONTEXT_SEGMENTS | \
|
#define CONTEXT_ALL (CONTEXT_CONTROL | CONTEXT_INTEGER | CONTEXT_SEGMENTS | \
|
||||||
CONTEXT_FLOATING_POINT | CONTEXT_DEBUG_REGISTERS | CONTEXT_EXTENDED_REGISTERS)
|
CONTEXT_FLOATING_POINT | CONTEXT_DEBUG_REGISTERS | CONTEXT_EXTENDED_REGISTERS)
|
||||||
|
@ -1014,6 +1015,7 @@ typedef struct _LDT_ENTRY {
|
||||||
#define CONTEXT_SEGMENTS (CONTEXT_AMD64 | 0x0004)
|
#define CONTEXT_SEGMENTS (CONTEXT_AMD64 | 0x0004)
|
||||||
#define CONTEXT_FLOATING_POINT (CONTEXT_AMD64 | 0x0008)
|
#define CONTEXT_FLOATING_POINT (CONTEXT_AMD64 | 0x0008)
|
||||||
#define CONTEXT_DEBUG_REGISTERS (CONTEXT_AMD64 | 0x0010)
|
#define CONTEXT_DEBUG_REGISTERS (CONTEXT_AMD64 | 0x0010)
|
||||||
|
#define CONTEXT_XSTATE (CONTEXT_AMD64 | 0x0040)
|
||||||
#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)
|
||||||
|
|
||||||
|
@ -2130,6 +2132,7 @@ NTSYSAPI void WINAPI RtlCaptureContext(CONTEXT*);
|
||||||
#define WOW64_CONTEXT_FLOATING_POINT (WOW64_CONTEXT_i386 | __MSABI_LONG(0x00000008))
|
#define WOW64_CONTEXT_FLOATING_POINT (WOW64_CONTEXT_i386 | __MSABI_LONG(0x00000008))
|
||||||
#define WOW64_CONTEXT_DEBUG_REGISTERS (WOW64_CONTEXT_i386 | __MSABI_LONG(0x00000010))
|
#define WOW64_CONTEXT_DEBUG_REGISTERS (WOW64_CONTEXT_i386 | __MSABI_LONG(0x00000010))
|
||||||
#define WOW64_CONTEXT_EXTENDED_REGISTERS (WOW64_CONTEXT_i386 | __MSABI_LONG(0x00000020))
|
#define WOW64_CONTEXT_EXTENDED_REGISTERS (WOW64_CONTEXT_i386 | __MSABI_LONG(0x00000020))
|
||||||
|
#define WOW64_CONTEXT_XSTATE (WOW64_CONTEXT_i386 | __MSABI_LONG(0x00000040))
|
||||||
#define WOW64_CONTEXT_FULL (WOW64_CONTEXT_CONTROL | WOW64_CONTEXT_INTEGER | WOW64_CONTEXT_SEGMENTS)
|
#define WOW64_CONTEXT_FULL (WOW64_CONTEXT_CONTROL | WOW64_CONTEXT_INTEGER | WOW64_CONTEXT_SEGMENTS)
|
||||||
#define WOW64_CONTEXT_ALL (WOW64_CONTEXT_CONTROL | WOW64_CONTEXT_INTEGER | \
|
#define WOW64_CONTEXT_ALL (WOW64_CONTEXT_CONTROL | WOW64_CONTEXT_INTEGER | \
|
||||||
WOW64_CONTEXT_SEGMENTS | WOW64_CONTEXT_FLOATING_POINT | \
|
WOW64_CONTEXT_SEGMENTS | WOW64_CONTEXT_FLOATING_POINT | \
|
||||||
|
|
Loading…
Reference in New Issue