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
8e3b5183
Commit
8e3b5183
authored
Jul 28, 2020
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winebuild: Store the syscall frame in the thread data on i386.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
3ba24075
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
5 deletions
+24
-5
signal_i386.c
dlls/ntdll/unix/signal_i386.c
+13
-1
import.c
tools/winebuild/import.c
+11
-4
No files found.
dlls/ntdll/unix/signal_i386.c
View file @
8e3b5183
...
...
@@ -473,6 +473,17 @@ enum i386_trap_code
#endif
};
struct
syscall_frame
{
struct
syscall_frame
*
prev_frame
;
DWORD
edi
;
DWORD
esi
;
DWORD
ebx
;
DWORD
ebp
;
DWORD
thunk_addr
;
DWORD
ret_addr
;
};
struct
x86_thread_data
{
DWORD
fs
;
/* 1d4 TEB selector */
...
...
@@ -484,12 +495,13 @@ struct x86_thread_data
DWORD
dr6
;
/* 1ec */
DWORD
dr7
;
/* 1f0 */
void
*
exit_frame
;
/* 1f4 exit frame pointer */
/* the ntdll_thread_data structure follows here
*/
struct
syscall_frame
*
syscall_frame
;
/* 1f8 frame pointer on syscall entry
*/
};
C_ASSERT
(
sizeof
(
struct
x86_thread_data
)
<=
sizeof
(((
struct
ntdll_thread_data
*
)
0
)
->
cpu_data
)
);
C_ASSERT
(
offsetof
(
TEB
,
GdiTebBatch
)
+
offsetof
(
struct
x86_thread_data
,
gs
)
==
0x1d8
);
C_ASSERT
(
offsetof
(
TEB
,
GdiTebBatch
)
+
offsetof
(
struct
x86_thread_data
,
exit_frame
)
==
0x1f4
);
C_ASSERT
(
offsetof
(
TEB
,
GdiTebBatch
)
+
offsetof
(
struct
x86_thread_data
,
syscall_frame
)
==
0x1f8
);
static
inline
struct
x86_thread_data
*
x86_thread_data
(
void
)
{
...
...
tools/winebuild/import.c
View file @
8e3b5183
...
...
@@ -1446,10 +1446,14 @@ void output_syscalls( DLLSPEC *spec )
output_cfi
(
".cfi_rel_offset %%ebp,0
\n
"
);
output
(
"
\t
movl %%esp,%%ebp
\n
"
);
output_cfi
(
".cfi_def_cfa_register %%ebp
\n
"
);
output
(
"
\t
pushl %%ebx
\n
"
);
output_cfi
(
".cfi_rel_offset %%ebx,-4
\n
"
);
output
(
"
\t
pushl %%esi
\n
"
);
output_cfi
(
".cfi_rel_offset %%esi,-
4
\n
"
);
output_cfi
(
".cfi_rel_offset %%esi,-
8
\n
"
);
output
(
"
\t
pushl %%edi
\n
"
);
output_cfi
(
".cfi_rel_offset %%edi,-8
\n
"
);
output_cfi
(
".cfi_rel_offset %%edi,-12
\n
"
);
output
(
"
\t
pushl %%fs:0x1f8
\n
"
);
/* x86_thread_data()->syscall_frame */
output
(
"
\t
movl %%esp,%%fs:0x1f8
\n
"
);
output
(
"
\t
cmpl $%u,%%eax
\n
"
,
count
);
output
(
"
\t
jae 3f
\n
"
);
if
(
UsePIC
)
...
...
@@ -1471,11 +1475,14 @@ void output_syscalls( DLLSPEC *spec )
output
(
"
\t
call *.Lsyscall_table-1b(%%eax,%%edx,4)
\n
"
);
else
output
(
"
\t
call *.Lsyscall_table(,%%eax,4)
\n
"
);
output
(
"
\t
leal -8(%%ebp),%%esp
\n
"
);
output
(
"2:
\t
popl %%edi
\n
"
);
output
(
"
\t
leal -16(%%ebp),%%esp
\n
"
);
output
(
"2:
\t
popl %%fs:0x1f8
\n
"
);
output
(
"
\t
popl %%edi
\n
"
);
output_cfi
(
".cfi_same_value %%edi
\n
"
);
output
(
"
\t
popl %%esi
\n
"
);
output_cfi
(
".cfi_same_value %%esi
\n
"
);
output
(
"
\t
popl %%ebx
\n
"
);
output_cfi
(
".cfi_same_value %%ebx
\n
"
);
output
(
"
\t
popl %%ebp
\n
"
);
output_cfi
(
".cfi_def_cfa %%esp,4
\n
"
);
output_cfi
(
".cfi_same_value %%ebp
\n
"
);
...
...
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