hi,

I am trying to add some support for the floating point unit to winedbg.
I have one question to the experts. The debugger code gets/sets the CPU
registers through a {G|S}etThreadContext() from the server, adding the
flag CONTEXT_FLOATING_POINT should make sure to include the FP
registers. This doesn't work because the server code clears the
CONTEXT_FLOATING_POINT flag at some point (see attached patch). My patch
is simply preventing this, but it may well be that the FP registers
should be available at this point.

So is this the correct fix? 

Rein.
-- 
Rein Klazes
[EMAIL PROTECTED]
--- wine/server/context_i386.c  2002-11-08 19:55:31.000000000 +0100
+++ mywine/server/context_i386.c        2003-02-03 17:14:03.000000000 +0100
@@ -569,7 +569,7 @@
         if (thread->context)  /* thread is inside an exception event */
         {
             copy_context( data, thread->context, flags );
-            flags &= CONTEXT_DEBUG_REGISTERS;
+            flags &= (CONTEXT_DEBUG_REGISTERS | CONTEXT_FLOATING_POINT );
         }
         if (flags && suspend_for_ptrace( thread ))
         {
@@ -597,7 +597,7 @@
         if (thread->context)  /* thread is inside an exception event */
         {
             copy_context( thread->context, get_req_data(), flags );
-            flags &= CONTEXT_DEBUG_REGISTERS;
+            flags &= (CONTEXT_DEBUG_REGISTERS | CONTEXT_FLOATING_POINT );
         }
         if (flags && suspend_for_ptrace( thread ))
         {

Reply via email to