From: Christian Inci Subject: [PATCH] ntdll: Zero DR7 if it's an int3 exception Message-Id: Date: Wed, 5 Apr 2017 18:43:49 +0200 This will fix the game crash issue of #32515. The other parts of the original patch seem unnecessary, they only handle the issue that the reserved bits of DR6/DR7 are being unset for whatever reasons. Signed-off-by: Christian Inci diff --git a/dlls/ntdll/signal_i386.c b/dlls/ntdll/signal_i386.c index 59dca6cf..9514676b 100644 --- a/dlls/ntdll/signal_i386.c +++ b/dlls/ntdll/signal_i386.c @@ -1126,7 +1126,10 @@ static inline void save_context( CONTEXT *context, const ucontext_t *sigcontext, context->Dr2 = regs->dr2; context->Dr3 = regs->dr3; context->Dr6 = regs->dr6; - context->Dr7 = regs->dr7; + if (get_trap_code(sigcontext) != TRAP_x86_BPTFLT) /* zero it if it's a Breakpoint exception */ + context->Dr7 = regs->dr7; + else + context->Dr7 = 0; if (fpu) {