[KDGDB] Various fixes and improvements

This commit is contained in:
Jérôme Gardou 2020-03-20 10:32:19 +00:00
parent 0b5033e2ff
commit de369ce26b
5 changed files with 53 additions and 23 deletions

View file

@ -129,11 +129,9 @@ KdpPortInitialize(IN ULONG ComPortNumber,
{
return STATUS_INVALID_PARAMETER;
}
else
{
KdComPortInUse = KdComPort.Address;
return STATUS_SUCCESS;
}
KdComPortInUse = KdComPort.Address;
return STATUS_SUCCESS;
}
/******************************************************************************
@ -300,7 +298,13 @@ KDSTATUS
NTAPI
KdpReceiveByte(_Out_ PUCHAR OutByte)
{
USHORT CpStatus = CpGetByte(&KdComPort, OutByte, TRUE, FALSE);
USHORT CpStatus;
do
{
CpStatus = CpGetByte(&KdComPort, OutByte, TRUE, FALSE);
} while (CpStatus == CP_GET_NODATA);
/* Get the byte */
if (CpStatus == CP_GET_SUCCESS)
{