ntdll: make sure flags are preserved in raise_trap_exception()
Austin English
austinenglish at gmail.com
Sat Apr 12 15:20:55 CDT 2014
Original author never sent to wine-patches.
For https://bugs.winehq.org/show_bug.cgi?id=25561
--
-Austin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20140412/69f3ca27/attachment.html>
-------------- next part --------------
diff --git a/dlls/ntdll/signal_i386.c b/dlls/ntdll/signal_i386.c
index 63bf088..5f8b8fd 100644
--- a/dlls/ntdll/signal_i386.c
+++ b/dlls/ntdll/signal_i386.c
@@ -1868,9 +1868,10 @@ static void WINAPI raise_trap_exception( EXCEPTION_RECORD *rec, CONTEXT *context
if( !(context->EFlags & 0x100) || (ntdll_get_thread_data()->dr7 & 0xff) )
{
/* (possible) hardware breakpoint, fetch the debug registers */
+ DWORD saved_flags = context->ContextFlags;
context->ContextFlags = CONTEXT_DEBUG_REGISTERS;
NtGetContextThread(GetCurrentThread(), context);
- context->ContextFlags |= CONTEXT_FULL; /* restore flags */
+ context->ContextFlags |= saved_flags; /* restore flags */
}
context->EFlags &= ~0x100; /* clear single-step flag */
More information about the wine-patches
mailing list