-/* $Id: kdebug.c,v 1.41 2003/01/15 19:58:07 chorns Exp $
+/* $Id: kdebug.c,v 1.46 2003/08/11 18:50:12 chorns Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
p2 += 5;
KdpBreakPending = TRUE;
}
- else if (!_strnicmp(p2, "COM", 3))
+ else if (!_strnicmp(p2, "COM", 3))
+ {
+ p2 += 3;
+ if ('=' == *p2)
{
- p2 += 3;
- if (*p2 != '=')
+ p2++;
+ Value = (ULONG)atol(p2);
+ if (0 < Value && Value < 5)
{
- p2++;
- Value = (ULONG)atol(p2);
- if (Value > 0 && Value < 5)
- {
- PortInfo.ComPort = Value;
- }
+ PortInfo.ComPort = Value;
}
+ }
}
else if (!_strnicmp(p2, "BAUDRATE", 8))
{
p2 += 8;
- if (*p2 != '=')
+ if ('=' == *p2)
{
p2++;
Value = (ULONG)atol(p2);
- if (Value > 0)
- {
- PortInfo.BaudRate = Value;
- }
+ if (0 < Value)
+ {
+ PortInfo.BaudRate = Value;
+ }
}
- else if (!_strnicmp(p2, "IRQ", 3))
+ }
+ else if (!_strnicmp(p2, "IRQ", 3))
+ {
+ p2 += 3;
+ if ('=' == *p2)
{
- p2 += 3;
- if (*p2 != '=')
+ p2++;
+ Value = (ULONG)atol(p2);
+ if (0 < Value)
{
- p2++;
- Value = (ULONG)atol(p2);
- if (Value > 0)
- {
- KdpPortIrq = Value;
- }
+ KdpPortIrq = Value;
}
}
}
#ifdef KDBG
else if (!_strnicmp(p2, "PROFILE", 7))
- {
+ {
KdbInitProfiling();
}
#endif /* KDBG */
p1 = p2;
}
- /* Print some information */
- if (KdDebuggerEnabled == TRUE)
- {
- if (KdDebugState & KD_DEBUG_GDB)
- PrintString("\n GDB debugging enabled. COM%ld %ld Baud\n\n",
- GdbPortInfo.ComPort, GdbPortInfo.BaudRate);
-
- if (KdDebugState & KD_DEBUG_PICE)
- PrintString("\n Private ICE debugger enabled\n\n");
-
- if (KdDebugState & KD_DEBUG_SCREEN)
- PrintString("\n Screen debugging enabled\n\n");
-
- if (KdDebugState & KD_DEBUG_BOCHS)
- PrintString("\n Bochs debugging enabled\n\n");
-
- if (KdDebugState & KD_DEBUG_SERIAL)
- PrintString("\n Serial debugging enabled. COM%ld %ld Baud\n\n",
- LogPortInfo.ComPort, LogPortInfo.BaudRate);
-
- if (KdDebugState & KD_DEBUG_FILELOG)
- PrintString("\n File log debugging enabled\n\n");
- if (KdDebugState & KD_DEBUG_MDA)
- PrintString("\n MDA debugging enabled\n\n");
- }
-
/* Perform any initialization nescessary */
if (KdDebuggerEnabled == TRUE)
{
}
}
+
+VOID
+KdInit3(VOID)
+{
+ /* Print some information */
+ if (KdDebuggerEnabled == TRUE)
+ {
+ if (KdDebugState & KD_DEBUG_GDB)
+ PrintString("\n GDB debugging enabled. COM%ld %ld Baud\n\n",
+ GdbPortInfo.ComPort, GdbPortInfo.BaudRate);
+
+ if (KdDebugState & KD_DEBUG_PICE)
+ PrintString("\n Private ICE debugger enabled\n\n");
+
+ if (KdDebugState & KD_DEBUG_SCREEN)
+ PrintString("\n Screen debugging enabled\n\n");
+
+ if (KdDebugState & KD_DEBUG_BOCHS)
+ PrintString("\n Bochs debugging enabled\n\n");
+
+ if (KdDebugState & KD_DEBUG_SERIAL)
+ PrintString("\n Serial debugging enabled. COM%ld %ld Baud\n\n",
+ LogPortInfo.ComPort, LogPortInfo.BaudRate);
+
+ if (KdDebugState & KD_DEBUG_FILELOG)
+ PrintString("\n File log debugging enabled\n\n");
+ if (KdDebugState & KD_DEBUG_MDA)
+ PrintString("\n MDA debugging enabled\n\n");
+ }
+}
+
+
VOID
KdSerialDebugPrint (LPSTR Message)
{
/* NTOSKRNL.KdPollBreakIn */
+/*
+ * @implemented
+ */
BOOLEAN STDCALL
KdPollBreakIn(VOID)
{
return KdpBreakPending;
}
+/*
+ * @implemented
+ */
VOID STDCALL
KeEnterKernelDebugger(VOID)
{
/* B - Bug check the system. */
else if (Code == 1)
{
- KeBugCheck(0);
+ KEBUGCHECK(0);
}
/*
* C - Dump statistics about the distribution of tagged blocks in