/* VARIABLES ***************************************************************/
-KD_PORT_INFORMATION PortInfo = {DEFAULT_DEBUG_PORT, DEFAULT_DEBUG_BAUD_RATE, 0};
+ULONG PortNumber = DEFAULT_DEBUG_PORT;
+CPPORT PortInfo = {0, DEFAULT_DEBUG_BAUD_RATE, 0};
ULONG KdpPortIrq;
#ifdef AUTO_ENABLE_BOCHS
KDP_DEBUG_MODE KdpDebugMode = {{{.Bochs=TRUE}}};
KdpDebugMode.Serial = TRUE;
/* Set the port to use */
- SerialPortInfo.ComPort = Value;
+ SerialPortNumber = Value;
KdpPort = Value;
}
}
if (Value)
{
KdpDebugMode.Serial = TRUE;
- SerialPortInfo.BaseAddress = Value;
- SerialPortInfo.ComPort = 0;
+ SerialPortInfo.Address = UlongToPtr(Value);
+ SerialPortNumber = 0;
KdpPort = 0;
}
}
KdpDebugMode.Gdb = TRUE;
/* Enable Debugging */
- KdDebuggerEnabled = TRUE;
KdDebuggerNotPresent = FALSE;
+ KdDebuggerEnabled = TRUE;
+ SharedUserData->KdDebuggerEnabled = TRUE;
WrapperInitRoutine = KdpGdbStubInit;
}
KdpDebugMode.Pice = TRUE;
/* Enable Debugging */
- KdDebuggerEnabled = TRUE;
KdDebuggerNotPresent = FALSE;
+ KdDebuggerEnabled = TRUE;
+ SharedUserData->KdDebuggerEnabled = TRUE;
}
return p2;
else if (strstr(CommandLine, "DEBUG"))
{
/* Enable the kernel debugger */
- KdDebuggerEnabled = TRUE;
KdDebuggerNotPresent = FALSE;
+ KdDebuggerEnabled = TRUE;
#ifdef KDBG
/* Get the KDBG Settings */
KdbpGetCommandLineSettings(LoaderBlock->LoadOptions);
#endif
}
+ /* Let user-mode know our state */
+ SharedUserData->KdDebuggerEnabled = KdDebuggerEnabled;
+
/* Get the port and baud rate */
Port = strstr(CommandLine, "DEBUGPORT");
BaudRate = strstr(CommandLine, "BAUDRATE");