Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
20a2cc97
Commit
20a2cc97
authored
Feb 14, 2019
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Store extended FPU state and debug registers in RtlRaiseException().
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
edbdec44
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
1 deletion
+16
-1
signal_i386.c
dlls/ntdll/signal_i386.c
+10
-1
exception.c
dlls/ntdll/tests/exception.c
+3
-0
winnt.h
include/winnt.h
+3
-0
No files found.
dlls/ntdll/signal_i386.c
View file @
20a2cc97
...
@@ -2534,7 +2534,16 @@ NTSTATUS WINAPI NtRaiseException( EXCEPTION_RECORD *rec, CONTEXT *context, BOOL
...
@@ -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
));
}
}
...
...
dlls/ntdll/tests/exception.c
View file @
20a2cc97
...
@@ -400,6 +400,9 @@ static DWORD rtlraiseexception_handler( EXCEPTION_RECORD *rec, EXCEPTION_REGISTR
...
@@ -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
*/
*/
...
...
include/winnt.h
View file @
20a2cc97
...
@@ -969,6 +969,7 @@ typedef struct _CONTEXT
...
@@ -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 {
...
@@ -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*);
...
@@ -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 | \
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment