[KDBG] Don't bring down the kernel either when int2c-ing from user mode
[reactos.git] / reactos / ntoskrnl / kdbg / kdb.c
index 17f4c78..3da12cc 100644 (file)
@@ -77,7 +77,7 @@ static KDB_ENTER_CONDITION KdbEnterConditions[][2] =
     { KdbDoNotEnter,      KdbEnterFromKmode },   /* 17: Alignment Check */
     { KdbDoNotEnter,      KdbEnterFromKmode },   /* 18: Machine Check */
     { KdbDoNotEnter,      KdbEnterFromKmode },   /* 19: SIMD fault */
-    { KdbEnterAlways,     KdbEnterAlways },      /* 20: Assertion failure */
+    { KdbEnterFromKmode,  KdbDoNotEnter },       /* 20: Assertion failure */
     { KdbDoNotEnter,      KdbEnterFromKmode }    /* Last entry: used for unknown exceptions */
 };
 
@@ -1236,7 +1236,7 @@ KdbpCallMainLoop(VOID)
  * Disables interrupts, releases display ownership, ...
  */
 static VOID
-KdbpInternalEnter()
+KdbpInternalEnter(VOID)
 {
     PETHREAD Thread;
     PVOID SavedInitialStack, SavedStackBase, SavedKernelStack;
@@ -1371,8 +1371,12 @@ KdbEnterDebuggerException(
     KdbCurrentProcess = PsGetCurrentProcess();
 
     /* Set continue type to kdContinue for single steps and breakpoints */
-    if (ExceptionCode == STATUS_SINGLE_STEP || ExceptionCode == STATUS_BREAKPOINT)
+    if (ExceptionCode == STATUS_SINGLE_STEP ||
+        ExceptionCode == STATUS_BREAKPOINT ||
+        ExceptionCode == STATUS_ASSERTION_FAILURE)
+    {
         ContinueType = kdContinue;
+    }
 
     /* Check if we should handle the exception. */
     /* FIXME - won't get all exceptions here :( */