Author: sginsberg
Date: Tue Sep 15 17:55:14 2015
New Revision: 69244

URL: http://svn.reactos.org/svn/reactos?rev=69244&view=rev
Log:
Completely disable the debug register assertions in the trap exit code for KDBG 
as it sets them improperly. These checks should not have been added for KDBG to 
begin with and would have made any usage of address breakpoints inside KDBG end 
up in a trap exit breakpoint. Whoever knows KDBG better than I do please 
investigate. However, enable the DR7 debug check for KD as it handles the debug 
registers just fine. The likelihood of loading a driver that modifies a debug 
register (which would be the only other thing triggering this) is pretty slim.

Modified:
    trunk/reactos/ntoskrnl/include/internal/i386/trap_x.h

Modified: trunk/reactos/ntoskrnl/include/internal/i386/trap_x.h
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/i386/trap_x.h?rev=69244&r1=69243&r2=69244&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/include/internal/i386/trap_x.h       [iso-8859-1] 
(original)
+++ trunk/reactos/ntoskrnl/include/internal/i386/trap_x.h       [iso-8859-1] 
Tue Sep 15 17:55:14 2015
@@ -153,6 +153,8 @@
         __debugbreak();
     }
 
+    /* FIXME: KDBG messes around with these improperly */
+#if !defined(KDBG)
     /* Check DR values */
     if (KiUserTrap(TrapFrame))
     {
@@ -175,8 +177,9 @@
         CheckDr(1, Prcb->ProcessorState.SpecialRegisters.KernelDr1);
         CheckDr(2, Prcb->ProcessorState.SpecialRegisters.KernelDr2);
         CheckDr(3, Prcb->ProcessorState.SpecialRegisters.KernelDr3);
-        //CheckDr(7, Prcb->ProcessorState.SpecialRegisters.KernelDr7);
-    }
+        CheckDr(7, Prcb->ProcessorState.SpecialRegisters.KernelDr7);
+    }
+#endif
 
     StopChecking = FALSE;
 }


Reply via email to