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
547d3a77
Commit
547d3a77
authored
Apr 09, 2024
by
Paul Gofman
Committed by
Alexandre Julliard
Apr 26, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Set exception reporting flags in NtGetContextThread().
parent
e1a816a3
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
22 additions
and
4 deletions
+22
-4
exception.c
dlls/ntdll/tests/exception.c
+4
-4
signal_arm.c
dlls/ntdll/unix/signal_arm.c
+1
-0
signal_arm64.c
dlls/ntdll/unix/signal_arm64.c
+3
-0
signal_i386.c
dlls/ntdll/unix/signal_i386.c
+1
-0
signal_x86_64.c
dlls/ntdll/unix/signal_x86_64.c
+2
-0
unix_private.h
dlls/ntdll/unix/unix_private.h
+11
-0
No files found.
dlls/ntdll/tests/exception.c
View file @
547d3a77
...
...
@@ -11146,8 +11146,8 @@ static void test_context_exception_request(void)
c
.
ContextFlags
=
CONTEXT_CONTROL
|
CONTEXT_EXCEPTION_REQUEST
;
ret
=
GetThreadContext
(
GetCurrentThread
(),
&
c
);
ok
(
ret
,
"got error %lu.
\n
"
,
GetLastError
()
);
todo_wine
ok
(
c
.
ContextFlags
==
expected_flags
||
broken
(
c
.
ContextFlags
==
0x10001
)
/* Win7 WoW64 */
,
"got %#lx.
\n
"
,
c
.
ContextFlags
);
ok
(
c
.
ContextFlags
==
expected_flags
||
broken
(
c
.
ContextFlags
==
0x10001
)
/* Win7 WoW64 */
,
"got %#lx.
\n
"
,
c
.
ContextFlags
);
if
(
c
.
ContextFlags
==
0x10001
)
{
win_skip
(
"Old WoW64 behaviour, skipping tests.
\n
"
);
...
...
@@ -11161,14 +11161,14 @@ static void test_context_exception_request(void)
c
.
ContextFlags
=
CONTEXT_CONTROL
|
CONTEXT_EXCEPTION_REQUEST
;
ret
=
GetThreadContext
(
thread
,
&
c
);
ok
(
ret
,
"got error %lu.
\n
"
,
GetLastError
()
);
todo_wine
ok
(
c
.
ContextFlags
==
expected_flags
,
"got %#lx.
\n
"
,
c
.
ContextFlags
);
ok
(
c
.
ContextFlags
==
expected_flags
,
"got %#lx.
\n
"
,
c
.
ContextFlags
);
CloseHandle
(
thread
);
c
.
ContextFlags
=
CONTEXT_CONTROL
|
CONTEXT_EXCEPTION_REQUEST
|
CONTEXT_EXCEPTION_REPORTING
|
CONTEXT_SERVICE_ACTIVE
|
CONTEXT_EXCEPTION_ACTIVE
;
ret
=
GetThreadContext
(
GetCurrentThread
(),
&
c
);
ok
(
ret
,
"got error %lu.
\n
"
,
GetLastError
()
);
todo_wine
ok
(
c
.
ContextFlags
==
expected_flags
,
"got %#lx.
\n
"
,
c
.
ContextFlags
);
ok
(
c
.
ContextFlags
==
expected_flags
,
"got %#lx.
\n
"
,
c
.
ContextFlags
);
p
.
event
=
CreateEventW
(
NULL
,
FALSE
,
FALSE
,
NULL
);
thread
=
CreateThread
(
NULL
,
0
,
test_context_exception_request_thread
,
&
p
,
CREATE_SUSPENDED
,
NULL
);
...
...
dlls/ntdll/unix/signal_arm.c
View file @
547d3a77
...
...
@@ -513,6 +513,7 @@ NTSTATUS WINAPI NtGetContextThread( HANDLE handle, CONTEXT *context )
memcpy
(
context
->
D
,
frame
->
d
,
sizeof
(
frame
->
d
)
);
context
->
ContextFlags
|=
CONTEXT_FLOATING_POINT
;
}
set_context_exception_reporting_flags
(
&
context
->
ContextFlags
,
CONTEXT_SERVICE_ACTIVE
);
return
STATUS_SUCCESS
;
}
...
...
dlls/ntdll/unix/signal_arm64.c
View file @
547d3a77
...
...
@@ -433,6 +433,7 @@ NTSTATUS WINAPI NtGetContextThread( HANDLE handle, CONTEXT *context )
context
->
ContextFlags
|=
CONTEXT_FLOATING_POINT
;
}
if
(
needed_flags
&
CONTEXT_DEBUG_REGISTERS
)
FIXME
(
"debug registers not supported
\n
"
);
set_context_exception_reporting_flags
(
&
context
->
ContextFlags
,
CONTEXT_SERVICE_ACTIVE
);
return
STATUS_SUCCESS
;
}
...
...
@@ -640,6 +641,7 @@ NTSTATUS get_thread_wow64_context( HANDLE handle, void *ctx, ULONG size )
context
->
Dr7
=
wow_frame
->
Dr7
;
}
/* FIXME: CONTEXT_I386_XSTATE */
set_context_exception_reporting_flags
(
&
context
->
ContextFlags
,
CONTEXT_SERVICE_ACTIVE
);
break
;
}
...
...
@@ -679,6 +681,7 @@ NTSTATUS get_thread_wow64_context( HANDLE handle, void *ctx, ULONG size )
memcpy
(
context
->
D
,
wow_frame
->
D
,
sizeof
(
wow_frame
->
D
)
);
context
->
ContextFlags
|=
CONTEXT_FLOATING_POINT
;
}
set_context_exception_reporting_flags
(
&
context
->
ContextFlags
,
CONTEXT_SERVICE_ACTIVE
);
break
;
}
...
...
dlls/ntdll/unix/signal_i386.c
View file @
547d3a77
...
...
@@ -1153,6 +1153,7 @@ NTSTATUS WINAPI NtGetContextThread( HANDLE handle, CONTEXT *context )
x86_thread_data
()
->
dr6
=
context
->
Dr6
;
x86_thread_data
()
->
dr7
=
context
->
Dr7
;
}
set_context_exception_reporting_flags
(
&
context
->
ContextFlags
,
CONTEXT_SERVICE_ACTIVE
);
}
if
(
context
->
ContextFlags
&
(
CONTEXT_INTEGER
&
~
CONTEXT_i386
))
...
...
dlls/ntdll/unix/signal_x86_64.c
View file @
547d3a77
...
...
@@ -1186,6 +1186,7 @@ NTSTATUS WINAPI NtGetContextThread( HANDLE handle, CONTEXT *context )
amd64_thread_data
()
->
dr6
=
context
->
Dr6
;
amd64_thread_data
()
->
dr7
=
context
->
Dr7
;
}
set_context_exception_reporting_flags
(
&
context
->
ContextFlags
,
CONTEXT_SERVICE_ACTIVE
);
return
STATUS_SUCCESS
;
}
...
...
@@ -1390,6 +1391,7 @@ NTSTATUS get_thread_wow64_context( HANDLE handle, void *ctx, ULONG size )
frame
->
restore_flags
|=
CONTEXT_XSTATE
;
}
}
set_context_exception_reporting_flags
(
&
context
->
ContextFlags
,
CONTEXT_SERVICE_ACTIVE
);
return
STATUS_SUCCESS
;
}
...
...
dlls/ntdll/unix/unix_private.h
View file @
547d3a77
...
...
@@ -215,6 +215,17 @@ extern int server_pipe( int fd[2] );
extern
void
fpux_to_fpu
(
I386_FLOATING_SAVE_AREA
*
fpu
,
const
XSAVE_FORMAT
*
fpux
);
extern
void
fpu_to_fpux
(
XSAVE_FORMAT
*
fpux
,
const
I386_FLOATING_SAVE_AREA
*
fpu
);
static
inline
void
set_context_exception_reporting_flags
(
DWORD
*
context_flags
,
DWORD
reporting_flag
)
{
if
(
!
(
*
context_flags
&
CONTEXT_EXCEPTION_REQUEST
))
{
*
context_flags
&=
~
(
CONTEXT_EXCEPTION_REPORTING
|
CONTEXT_SERVICE_ACTIVE
|
CONTEXT_EXCEPTION_ACTIVE
);
return
;
}
*
context_flags
=
(
*
context_flags
&
~
(
CONTEXT_SERVICE_ACTIVE
|
CONTEXT_EXCEPTION_ACTIVE
))
|
CONTEXT_EXCEPTION_REPORTING
|
reporting_flag
;
}
extern
BOOL
xstate_compaction_enabled
;
extern
UINT64
xstate_supported_features_mask
;
extern
UINT64
xstate_features_size
;
...
...
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