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
accf7a09
Commit
accf7a09
authored
Feb 15, 2021
by
Jacek Caban
Committed by
Alexandre Julliard
Feb 17, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Store instruction pointer register in x86_64 syscall frame.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
9bdd02de
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
signal_x86_64.c
dlls/ntdll/unix/signal_x86_64.c
+2
-2
import.c
tools/winebuild/import.c
+3
-1
No files found.
dlls/ntdll/unix/signal_x86_64.c
View file @
accf7a09
...
@@ -1946,7 +1946,7 @@ NTSTATUS WINAPI NtGetContextThread( HANDLE handle, CONTEXT *context )
...
@@ -1946,7 +1946,7 @@ NTSTATUS WINAPI NtGetContextThread( HANDLE handle, CONTEXT *context )
{
{
context
->
Rsp
=
(
ULONG64
)
&
frame
->
ret_addr
;
context
->
Rsp
=
(
ULONG64
)
&
frame
->
ret_addr
;
context
->
Rbp
=
frame
->
rbp
;
context
->
Rbp
=
frame
->
rbp
;
context
->
Rip
=
frame
->
thunk_addr
;
context
->
Rip
=
frame
->
rip
;
context
->
EFlags
=
frame
->
eflags
;
context
->
EFlags
=
frame
->
eflags
;
__asm__
(
"movw %%cs,%0"
:
"=g"
(
context
->
SegCs
)
);
__asm__
(
"movw %%cs,%0"
:
"=g"
(
context
->
SegCs
)
);
__asm__
(
"movw %%ss,%0"
:
"=g"
(
context
->
SegSs
)
);
__asm__
(
"movw %%ss,%0"
:
"=g"
(
context
->
SegSs
)
);
...
@@ -2410,7 +2410,7 @@ static BOOL handle_syscall_fault( ucontext_t *sigcontext, EXCEPTION_RECORD *rec,
...
@@ -2410,7 +2410,7 @@ static BOOL handle_syscall_fault( ucontext_t *sigcontext, EXCEPTION_RECORD *rec,
R14_sig
(
sigcontext
)
=
frame
->
r14
;
R14_sig
(
sigcontext
)
=
frame
->
r14
;
R15_sig
(
sigcontext
)
=
frame
->
r15
;
R15_sig
(
sigcontext
)
=
frame
->
r15
;
RSP_sig
(
sigcontext
)
=
(
ULONG_PTR
)
&
frame
->
ret_addr
;
RSP_sig
(
sigcontext
)
=
(
ULONG_PTR
)
&
frame
->
ret_addr
;
RIP_sig
(
sigcontext
)
=
frame
->
thunk_addr
;
RIP_sig
(
sigcontext
)
=
frame
->
rip
;
if
(
fpu
)
*
fpu
=
get_syscall_xsave
(
frame
)
->
xsave
;
if
(
fpu
)
*
fpu
=
get_syscall_xsave
(
frame
)
->
xsave
;
amd64_thread_data
()
->
syscall_frame
=
NULL
;
amd64_thread_data
()
->
syscall_frame
=
NULL
;
}
}
...
...
tools/winebuild/import.c
View file @
accf7a09
...
@@ -1522,10 +1522,12 @@ void output_syscalls( DLLSPEC *spec )
...
@@ -1522,10 +1522,12 @@ void output_syscalls( DLLSPEC *spec )
output
(
"
\t
movq %%r13,-0x40(%%rbp)
\n
"
);
output
(
"
\t
movq %%r13,-0x40(%%rbp)
\n
"
);
output
(
"
\t
movq %%r14,-0x38(%%rbp)
\n
"
);
output
(
"
\t
movq %%r14,-0x38(%%rbp)
\n
"
);
output
(
"
\t
movq %%r15,-0x30(%%rbp)
\n
"
);
output
(
"
\t
movq %%r15,-0x30(%%rbp)
\n
"
);
output
(
"
\t
fxsave64 (%%rsp)
\n
"
);
/* Legends of Runeterra hooks the first system call return instruction, and
/* Legends of Runeterra hooks the first system call return instruction, and
* depends on us returning to it. Adjust the return address accordingly. */
* depends on us returning to it. Adjust the return address accordingly. */
output
(
"
\t
subq $0xb,0x8(%%rbp)
\n
"
);
output
(
"
\t
subq $0xb,0x8(%%rbp)
\n
"
);
output
(
"
\t
movq 0x8(%%rbp),%%rbx
\n
"
);
output
(
"
\t
movq %%rbx,-0x28(%%rbp)
\n
"
);
output
(
"
\t
fxsave64 (%%rsp)
\n
"
);
output
(
"
\t
movq %%gs:0x30,%%rcx
\n
"
);
output
(
"
\t
movq %%gs:0x30,%%rcx
\n
"
);
output
(
"
\t
leaq -0x98(%%rbp),%%rbx
\n
"
);
output
(
"
\t
leaq -0x98(%%rbp),%%rbx
\n
"
);
output
(
"
\t
movq %%rbx,0x328(%%rcx)
\n
"
);
/* amd64_thread_data()->syscall_frame */
output
(
"
\t
movq %%rbx,0x328(%%rcx)
\n
"
);
/* amd64_thread_data()->syscall_frame */
...
...
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