- Preinitialise the com port infos with default values. - Set the baud rate also in SerialPortInfo. Modified: trunk/reactos/ntoskrnl/kd/kdinit.c Modified: trunk/reactos/ntoskrnl/kd/kdio.c _____
Modified: trunk/reactos/ntoskrnl/kd/kdinit.c --- trunk/reactos/ntoskrnl/kd/kdinit.c 2005-04-26 18:18:36 UTC (rev 14819) +++ trunk/reactos/ntoskrnl/kd/kdinit.c 2005-04-26 19:06:19 UTC (rev 14820) @@ -13,7 +13,7 @@
/* VARIABLES ***************************************************************/
-KD_PORT_INFORMATION PortInfo; +KD_PORT_INFORMATION PortInfo = {DEFAULT_DEBUG_PORT, DEFAULT_DEBUG_BAUD_RATE, 0}; ULONG KdpPortIrq; KDP_DEBUG_MODE KdpDebugMode; LIST_ENTRY KdProviders; @@ -54,11 +54,6 @@ /* Enable Debugging */ KdDebuggerEnabled = TRUE; WrapperInitRoutine = KdpGdbStubInit; - - /* Reset port information to defaults */ - RtlMoveMemory(&GdbPortInfo, &PortInfo, sizeof(KD_PORT_INFORMATION)); - PortInfo.ComPort = DEFAULT_DEBUG_PORT; - PortInfo.BaudRate = DEFAULT_DEBUG_BAUD_RATE; }
/* Check for PICE Debugging */ @@ -108,7 +103,7 @@ KdpDebugMode.Serial = TRUE;
/* Set the port to use */ - SerialPortInfo.ComPort = Value; + SerialPortInfo.ComPort = Value; KdpPort = Value; } } @@ -210,7 +205,7 @@ Value = (ULONG)atol(p2);
/* Check if it's valid and Set it */ - if (0 < Value) PortInfo.BaudRate = Value; + if (0 < Value) PortInfo.BaudRate = SerialPortInfo.BaudRate = Value; } /* Check Serial Port Settings [IRQ] */ else if (!_strnicmp(p2, "IRQ=", 4)) _____
Modified: trunk/reactos/ntoskrnl/kd/kdio.c --- trunk/reactos/ntoskrnl/kd/kdio.c 2005-04-26 18:18:36 UTC (rev 14819) +++ trunk/reactos/ntoskrnl/kd/kdio.c 2005-04-26 19:06:19 UTC (rev 14820) @@ -22,7 +22,7 @@
ULONG CurrentPosition; WORK_QUEUE_ITEM KdpDebugLogQueue; BOOLEAN ItemQueued; -KD_PORT_INFORMATION SerialPortInfo; +KD_PORT_INFORMATION SerialPortInfo = {DEFAULT_DEBUG_PORT, DEFAULT_DEBUG_BAUD_RATE, 0};
/* Current Port in use. FIXME: Do we support more then one? */ ULONG KdpPort;