[PATCH] [NtDll]: fix getting debug register in trap exception

Eric Pouech eric.pouech at orange.fr
Fri Mar 2 14:45:45 CST 2012


fixes #25561 (and patch also from debug report)

A+
---

 dlls/ntdll/signal_i386.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)


diff --git a/dlls/ntdll/signal_i386.c b/dlls/ntdll/signal_i386.c
index e839994..8a15c1e 100644
--- a/dlls/ntdll/signal_i386.c
+++ b/dlls/ntdll/signal_i386.c
@@ -1770,10 +1770,11 @@ static void WINAPI raise_trap_exception( EXCEPTION_RECORD *rec, CONTEXT *context
 
         if( !(context->EFlags & 0x100) || (ntdll_get_thread_data()->dr7 & 0xff) )
         {
+            DWORD flags = context->ContextFlags;
             /* (possible) hardware breakpoint, fetch the debug registers */
             context->ContextFlags = CONTEXT_DEBUG_REGISTERS;
             NtGetContextThread(GetCurrentThread(), context);
-            context->ContextFlags |= CONTEXT_FULL;  /* restore flags */
+            context->ContextFlags |= flags;  /* restore flags */
         }
 
         context->EFlags &= ~0x100;  /* clear single-step flag */




More information about the wine-patches mailing list