[CMAKE]
[reactos.git] / ntoskrnl / kdbg / kdb.c
index 058e112..67037f6 100644 (file)
@@ -1413,6 +1413,8 @@ KdbEnterDebuggerException(
             /* Delete the temporary breakpoint which was used to step over or into the instruction. */
             KdbpDeleteBreakPoint(-1, BreakPoint);
 
+            TrapFrame->Eip--;
+
             if (--KdbNumSingleSteps > 0)
             {
                 if ((KdbSingleStepOver && !KdbpStepOverInstruction(TrapFrame->Eip)) ||
@@ -1681,8 +1683,11 @@ continue_execution:
         /* Clear dr6 status flags. */
         TrapFrame->Dr6 &= ~0x0000e00f;
 
-        /* Skip the current instruction */
-        Context->Eip++;
+        if (!(KdbEnteredOnSingleStep && KdbSingleStepOver))
+        {
+            /* Skip the current instruction */
+            Context->Eip++;
+        }
     }
 
     return ContinueType;
@@ -1690,6 +1695,7 @@ continue_execution:
 
 VOID
 NTAPI
+INIT_FUNCTION
 KdbpGetCommandLineSettings(
     PCHAR p1)
 {
@@ -1697,7 +1703,7 @@ KdbpGetCommandLineSettings(
 
     while (p1 && (p2 = strchr(p1, ' ')))
     {
-        p2++;
+        p2 += 2;
 
         if (!_strnicmp(p2, "KDSERIAL", 8))
         {
@@ -1710,6 +1716,11 @@ KdbpGetCommandLineSettings(
             p2 += 8;
             KdbDebugState |= KD_DEBUG_KDNOECHO;
         }
+        else if (!_strnicmp(p2, "FIRSTCHANCE", 11))
+        {
+            p2 += 11;
+            KdbpSetEnterCondition(-1, TRUE, KdbEnterAlways);
+        }
 
         p1 = p2;
     }