server: Fix FPU registers in get_thread_context()
Petr Tesarik
hat at tesarici.cz
Mon Mar 27 01:51:03 CST 2006
Hi,
this patch fixes a bug in get_thread_context(). Currently, this
routine assumes that all registers except debug registers are saved in
thread->context if it exists. However, it does not include FPU
registers.
IMO, we should not blindly assume which registers are present in
thread->context but look at ContextFlags.
BTW I found this bug when winedbg stopped working with programs using
the FPU.
ChangeLog:
* Look at ContextFlags to see which registers are saved in
thread->context.
-------------- next part --------------
Index: context_i386.c
===================================================================
RCS file: /home/wine/wine/server/context_i386.c,v
retrieving revision 1.37
diff -u -r1.37 context_i386.c
--- context_i386.c 14 Feb 2006 13:35:01 -0000 1.37
+++ context_i386.c 27 Mar 2006 07:48:32 -0000
@@ -596,7 +596,7 @@
if (thread->context) /* thread is inside an exception event or suspended */
{
copy_context( context, thread->context, flags );
- flags &= CONTEXT_DEBUG_REGISTERS;
+ flags &= ~thread->context->ContextFlags | CONTEXT_DEBUG_REGISTERS;
}
if (flags && suspend_for_ptrace( thread ))
More information about the wine-patches
mailing list