Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
77fbf3a9
Commit
77fbf3a9
authored
Aug 20, 2020
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Unwind the syscall frame in NtSetContextThread().
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
a686759f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
1 deletion
+15
-1
signal_arm.c
dlls/ntdll/unix/signal_arm.c
+6
-1
signal_arm64.c
dlls/ntdll/unix/signal_arm64.c
+2
-0
signal_i386.c
dlls/ntdll/unix/signal_i386.c
+3
-0
signal_x86_64.c
dlls/ntdll/unix/signal_x86_64.c
+4
-0
No files found.
dlls/ntdll/unix/signal_arm.c
View file @
77fbf3a9
...
...
@@ -461,7 +461,12 @@ NTSTATUS WINAPI NtSetContextThread( HANDLE handle, const CONTEXT *context )
context_to_server
(
&
server_context
,
context
);
ret
=
set_thread_context
(
handle
,
&
server_context
,
&
self
);
if
(
self
&&
ret
==
STATUS_SUCCESS
)
set_cpu_context
(
context
);
if
(
self
&&
ret
==
STATUS_SUCCESS
)
{
struct
syscall_frame
*
frame
=
arm_thread_data
()
->
syscall_frame
;
arm_thread_data
()
->
syscall_frame
=
frame
->
prev_frame
;
set_cpu_context
(
context
);
}
return
ret
;
}
...
...
dlls/ntdll/unix/signal_arm64.c
View file @
77fbf3a9
...
...
@@ -520,6 +520,8 @@ NTSTATUS WINAPI NtSetContextThread( HANDLE handle, const CONTEXT *context )
}
if
(
self
&&
ret
==
STATUS_SUCCESS
)
{
struct
syscall_frame
*
frame
=
arm64_thread_data
()
->
syscall_frame
;
arm64_thread_data
()
->
syscall_frame
=
frame
->
prev_frame
;
InterlockedExchangePointer
(
(
void
**
)
&
arm64_thread_data
()
->
context
,
(
void
*
)
context
);
raise
(
SIGUSR2
);
}
...
...
dlls/ntdll/unix/signal_i386.c
View file @
77fbf3a9
...
...
@@ -870,6 +870,9 @@ static inline void restore_context( const CONTEXT *context, ucontext_t *sigconte
*/
extern
void
set_full_cpu_context
(
const
CONTEXT
*
context
);
__ASM_GLOBAL_FUNC
(
set_full_cpu_context
,
"movl %fs:0x1f8,%eax
\n\t
"
/* x86_thread_data()->syscall_frame */
"movl (%eax),%eax
\n\t
"
/* frame->prev_frame */
"movl %eax,%fs:0x1f8
\n\t
"
"movl 4(%esp),%ecx
\n\t
"
"movw 0x8c(%ecx),%gs
\n\t
"
/* SegGs */
"movw 0x90(%ecx),%fs
\n\t
"
/* SegFs */
...
...
dlls/ntdll/unix/signal_x86_64.c
View file @
77fbf3a9
...
...
@@ -1708,7 +1708,11 @@ NTSTATUS WINAPI NtSetContextThread( HANDLE handle, const CONTEXT *context )
if
(
!
(
flags
&
CONTEXT_CONTROL
))
FIXME
(
"setting partial context (%x) not supported
\n
"
,
flags
);
else
{
struct
syscall_frame
*
frame
=
amd64_thread_data
()
->
syscall_frame
;
amd64_thread_data
()
->
syscall_frame
=
frame
->
prev_frame
;
set_full_cpu_context
(
context
);
}
}
return
ret
;
}
...
...
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