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
3faa6dde
Commit
3faa6dde
authored
Nov 06, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
Nov 22, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Add a syscall_cfa member to the i386 syscall frame.
Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=52213
Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=54346
parent
e1f54247
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
7 deletions
+13
-7
signal_i386.c
dlls/ntdll/unix/signal_i386.c
+13
-7
No files found.
dlls/ntdll/unix/signal_i386.c
View file @
3faa6dde
...
...
@@ -455,7 +455,7 @@ struct syscall_frame
UINT
edi
;
/* 02c */
UINT
esi
;
/* 030 */
UINT
ebp
;
/* 034 */
void
*
unused
;
/* 038 */
void
*
syscall_cfa
;
/* 038 */
struct
syscall_frame
*
prev_frame
;
/* 03c */
union
/* 040 */
{
...
...
@@ -1592,9 +1592,10 @@ __ASM_GLOBAL_FUNC( call_user_mode_callback,
__ASM_CFI
(
".cfi_rel_offset %edi,-12
\n\t
"
)
"movl 0x20(%ebp),%edx
\n\t
"
/* teb */
"pushl 0(%edx)
\n\t
"
/* teb->Tib.ExceptionList */
"subl $0x38
4,%esp
\n\t
"
/* sizeof(struct syscall_frame) + ebp
*/
"subl $0x38
0,%esp
\n\t
"
/* sizeof(struct syscall_frame)
*/
"andl $~63,%esp
\n\t
"
"movl %ebp,0x380(%esp)
\n\t
"
"leal 8(%ebp),%eax
\n\t
"
"movl %eax,0x38(%esp)
\n\t
"
/* frame->syscall_cfa */
"movl 0x1f8(%edx),%ecx
\n\t
"
/* x86_thread_data()->syscall_frame */
"movl (%ecx),%eax
\n\t
"
/* frame->syscall_flags */
"movl %eax,(%esp)
\n\t
"
...
...
@@ -1622,7 +1623,8 @@ __ASM_GLOBAL_FUNC( user_mode_callback_return,
"movl 0x1f8(%edx),%eax
\n\t
"
/* x86_thread_data()->syscall_frame */
"movl 0x3c(%eax),%ecx
\n\t
"
/* frame->prev_frame */
"movl %ecx,0x1f8(%edx)
\n\t
"
/* x86_thread_data()->syscall_frame */
"movl 0x380(%eax),%ebp
\n\t
"
/* call_user_mode_callback ebp */
"movl 0x38(%eax),%ebp
\n\t
"
/* frame->syscall_cfa */
"subl $8,%ebp
\n\t
"
__ASM_CFI
(
".cfi_adjust_cfa_offset 4
\n\t
"
)
__ASM_CFI
(
".cfi_rel_offset %ebp,0
\n\t
"
)
__ASM_CFI
(
".cfi_def_cfa_register %ebp
\n\t
"
)
...
...
@@ -2415,10 +2417,10 @@ void signal_init_process(void)
/***********************************************************************
* call_init_thunk
*/
void
call_init_thunk
(
LPTHREAD_START_ROUTINE
entry
,
void
*
arg
,
BOOL
suspend
,
TEB
*
teb
)
void
call_init_thunk
(
LPTHREAD_START_ROUTINE
entry
,
void
*
arg
,
BOOL
suspend
,
TEB
*
teb
,
struct
syscall_frame
*
frame
,
void
*
syscall_cfa
)
{
struct
x86_thread_data
*
thread_data
=
(
struct
x86_thread_data
*
)
&
teb
->
GdiTebBatch
;
struct
syscall_frame
*
frame
=
thread_data
->
syscall_frame
;
CONTEXT
*
ctx
,
context
=
{
CONTEXT_ALL
};
DWORD
*
stack
;
...
...
@@ -2460,6 +2462,7 @@ void call_init_thunk( LPTHREAD_START_ROUTINE entry, void *arg, BOOL suspend, TEB
frame
->
eip
=
(
DWORD
)
pLdrInitializeThunk
;
frame
->
prev_frame
=
NULL
;
frame
->
syscall_flags
=
syscall_flags
;
frame
->
syscall_cfa
=
syscall_cfa
;
frame
->
restore_flags
|=
LOWORD
(
CONTEXT_INTEGER
);
pthread_sigmask
(
SIG_UNBLOCK
,
&
server_block_set
,
NULL
);
...
...
@@ -2482,6 +2485,7 @@ __ASM_GLOBAL_FUNC( signal_start_thread,
__ASM_CFI
(
".cfi_rel_offset %esi,-8
\n\t
"
)
"pushl %edi
\n\t
"
__ASM_CFI
(
".cfi_rel_offset %edi,-12
\n\t
"
)
"leal 8(%ebp),%edx
\n\t
"
/* syscall_cfa */
/* store exit frame */
"movl 20(%ebp),%ecx
\n\t
"
/* teb */
"movl %ebp,0x1f4(%ecx)
\n\t
"
/* x86_thread_data()->exit_frame */
...
...
@@ -2493,7 +2497,9 @@ __ASM_GLOBAL_FUNC( signal_start_thread,
"andl $~63,%eax
\n\t
"
"movl %eax,0x1f8(%ecx)
\n
"
/* x86_thread_data()->syscall_frame */
/* switch to kernel stack */
"1:
\t
movl %eax,%esp
\n\t
"
"1:
\t
leal -8(%eax),%esp
\n\t
"
"pushl %edx
\n\t
"
/* syscall_cfa */
"pushl %eax
\n\t
"
/* syscall_frame */
"pushl %ecx
\n\t
"
/* teb */
"pushl 16(%ebp)
\n\t
"
/* suspend */
"pushl 12(%ebp)
\n\t
"
/* arg */
...
...
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