Module: wine Branch: master Commit: 8b929bd759334611c0c957482060168fe441cd5f URL: http://source.winehq.org/git/wine.git/?a=commit;h=8b929bd759334611c0c9574820...
Author: Alexandre Julliard julliard@winehq.org Date: Tue Sep 19 12:13:54 2017 +0200
ntdll: Set the initial process context on i386.
Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/ntdll/signal_i386.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/dlls/ntdll/signal_i386.c b/dlls/ntdll/signal_i386.c index a373e3d..4038436 100644 --- a/dlls/ntdll/signal_i386.c +++ b/dlls/ntdll/signal_i386.c @@ -2600,7 +2600,20 @@ void signal_init_process( CONTEXT *context, LPTHREAD_START_ROUTINE entry )
wine_ldt_init_locking( ldt_lock, ldt_unlock );
- /* FIXME: set the initial context */ + /* build the initial context */ + context->ContextFlags = CONTEXT_FULL; + context->SegCs = wine_get_cs(); + context->SegDs = wine_get_ds(); + context->SegEs = wine_get_es(); + context->SegFs = wine_get_fs(); + context->SegGs = wine_get_gs(); + context->SegSs = wine_get_ss(); + context->Eax = (DWORD)entry; + context->Ebx = (DWORD)NtCurrentTeb()->Peb; + context->Esp = (DWORD)NtCurrentTeb()->Tib.StackBase - 16; + context->Eip = (DWORD)call_thread_entry_point; + ((void **)context->Esp)[1] = kernel32_start_process; + ((void **)context->Esp)[2] = entry; return;
error: