Alexandre Julliard : ntdll:
Support setting the CPU context on the current thread without segment
registers .
Alexandre Julliard
julliard at wine.codeweavers.com
Tue May 8 13:17:02 CDT 2007
Module: wine
Branch: master
Commit: c5134b77c67ea158394bb70bed79de2b83e04f5a
URL: http://source.winehq.org/git/wine.git/?a=commit;h=c5134b77c67ea158394bb70bed79de2b83e04f5a
Author: Alexandre Julliard <julliard at winehq.org>
Date: Tue May 8 20:09:25 2007 +0200
ntdll: Support setting the CPU context on the current thread without segment registers.
---
dlls/ntdll/signal_i386.c | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/dlls/ntdll/signal_i386.c b/dlls/ntdll/signal_i386.c
index 69ae4dd..39f6f4b 100644
--- a/dlls/ntdll/signal_i386.c
+++ b/dlls/ntdll/signal_i386.c
@@ -758,10 +758,19 @@ void set_cpu_context( const CONTEXT *context )
}
if (flags & CONTEXT_FULL)
{
- if ((flags & CONTEXT_FULL) != (CONTEXT_FULL & ~CONTEXT_i386))
+ if (!(flags & CONTEXT_CONTROL))
FIXME( "setting partial context (%x) not supported\n", flags );
- else
+ else if (flags & CONTEXT_SEGMENTS)
__wine_call_from_32_restore_regs( context );
+ else
+ {
+ CONTEXT newcontext = *context;
+ newcontext.SegDs = wine_get_ds();
+ newcontext.SegEs = wine_get_es();
+ newcontext.SegFs = wine_get_fs();
+ newcontext.SegGs = wine_get_gs();
+ __wine_call_from_32_restore_regs( &newcontext );
+ }
}
}
More information about the wine-cvs
mailing list