2009-10-22 14:58:33 +00:00
|
|
|
/*
|
|
|
|
* COPYRIGHT: GPL, see COPYING in the top level directory
|
|
|
|
* PROJECT: ReactOS kernel
|
|
|
|
* FILE: drivers/base/kddll/kddll.c
|
|
|
|
* PURPOSE: Base functions for the kernel debugger.
|
2014-12-23 17:48:16 +00:00
|
|
|
* PROGRAMMER: Timo Kreuzer (timo.kreuzer@reactos.org)
|
2009-10-22 14:58:33 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include "kddll.h"
|
|
|
|
|
|
|
|
/* GLOBALS ********************************************************************/
|
|
|
|
|
|
|
|
ULONG CurrentPacketId = INITIAL_PACKET_ID | SYNC_PACKET_ID;
|
2016-05-28 15:54:44 +00:00
|
|
|
ULONG RemotePacketId = INITIAL_PACKET_ID;
|
2009-10-22 14:58:33 +00:00
|
|
|
|
|
|
|
|
|
|
|
/* PRIVATE FUNCTIONS **********************************************************/
|
|
|
|
|
|
|
|
/******************************************************************************
|
|
|
|
* \name KdpCalculateChecksum
|
|
|
|
* \brief Calculates the checksum for the packet data.
|
|
|
|
* \param Buffer Pointer to the packet data.
|
|
|
|
* \param Length Length of data in bytes.
|
|
|
|
* \return The calculated checksum.
|
|
|
|
* \sa http://www.vista-xp.co.uk/forums/technical-reference-library/2540-basics-debugging.html
|
|
|
|
*/
|
|
|
|
ULONG
|
|
|
|
NTAPI
|
|
|
|
KdpCalculateChecksum(
|
|
|
|
IN PVOID Buffer,
|
|
|
|
IN ULONG Length)
|
|
|
|
{
|
2016-05-28 15:51:44 +00:00
|
|
|
PUCHAR ByteBuffer = Buffer;
|
|
|
|
ULONG Checksum = 0;
|
2009-10-22 14:58:33 +00:00
|
|
|
|
2016-05-28 15:51:44 +00:00
|
|
|
while (Length-- > 0)
|
2013-04-23 00:41:45 +00:00
|
|
|
{
|
2016-05-28 15:51:44 +00:00
|
|
|
Checksum += (ULONG)*ByteBuffer++;
|
2013-04-23 00:41:45 +00:00
|
|
|
}
|
2009-10-22 14:58:33 +00:00
|
|
|
return Checksum;
|
|
|
|
}
|
|
|
|
|
|
|
|
VOID
|
|
|
|
NTAPI
|
|
|
|
KdpSendControlPacket(
|
|
|
|
IN USHORT PacketType,
|
|
|
|
IN ULONG PacketId OPTIONAL)
|
|
|
|
{
|
|
|
|
KD_PACKET Packet;
|
|
|
|
|
|
|
|
Packet.PacketLeader = CONTROL_PACKET_LEADER;
|
|
|
|
Packet.PacketId = PacketId;
|
|
|
|
Packet.ByteCount = 0;
|
|
|
|
Packet.Checksum = 0;
|
|
|
|
Packet.PacketType = PacketType;
|
|
|
|
|
|
|
|
KdpSendBuffer(&Packet, sizeof(KD_PACKET));
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* PUBLIC FUNCTIONS ***********************************************************/
|
|
|
|
|
|
|
|
/******************************************************************************
|
|
|
|
* \name KdReceivePacket
|
|
|
|
* \brief Receive a packet from the KD port.
|
|
|
|
* \param [in] PacketType Describes the type of the packet to receive.
|
|
|
|
* This can be one of the PACKET_TYPE_ constants.
|
|
|
|
* \param [out] MessageHeader Pointer to a STRING structure for the header.
|
|
|
|
* \param [out] MessageData Pointer to a STRING structure for the data.
|
|
|
|
* \return KdPacketReceived if successful, KdPacketTimedOut if the receive
|
|
|
|
* timed out, KdPacketNeedsResend to signal that the last packet needs
|
|
|
|
* to be sent again.
|
|
|
|
* \note If PacketType is PACKET_TYPE_KD_POLL_BREAKIN, the function doesn't
|
|
|
|
* wait for any data, but returns KdPacketTimedOut instantly if no breakin
|
|
|
|
* packet byte is received.
|
|
|
|
* \sa http://www.nynaeve.net/?p=169
|
|
|
|
*/
|
|
|
|
KDP_STATUS
|
|
|
|
NTAPI
|
|
|
|
KdReceivePacket(
|
|
|
|
IN ULONG PacketType,
|
|
|
|
OUT PSTRING MessageHeader,
|
|
|
|
OUT PSTRING MessageData,
|
|
|
|
OUT PULONG DataLength,
|
|
|
|
IN OUT PKD_CONTEXT KdContext)
|
|
|
|
{
|
|
|
|
UCHAR Byte = 0;
|
|
|
|
KDP_STATUS KdStatus;
|
|
|
|
KD_PACKET Packet;
|
|
|
|
ULONG Checksum;
|
|
|
|
|
|
|
|
/* Special handling for breakin packet */
|
2016-05-28 15:54:44 +00:00
|
|
|
if (PacketType == PACKET_TYPE_KD_POLL_BREAKIN)
|
2009-10-22 14:58:33 +00:00
|
|
|
{
|
|
|
|
return KdpPollBreakIn();
|
|
|
|
}
|
|
|
|
|
|
|
|
for (;;)
|
|
|
|
{
|
|
|
|
/* Step 1 - Read PacketLeader */
|
|
|
|
KdStatus = KdpReceivePacketLeader(&Packet.PacketLeader);
|
|
|
|
if (KdStatus != KDP_PACKET_RECEIVED)
|
|
|
|
{
|
|
|
|
/* Check if we got a breakin */
|
|
|
|
if (KdStatus == KDP_PACKET_RESEND)
|
|
|
|
{
|
2016-05-28 15:51:44 +00:00
|
|
|
KdContext->KdpControlCPending = TRUE;
|
2009-10-22 14:58:33 +00:00
|
|
|
}
|
|
|
|
return KdStatus;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Step 2 - Read PacketType */
|
|
|
|
KdStatus = KdpReceiveBuffer(&Packet.PacketType, sizeof(USHORT));
|
|
|
|
if (KdStatus != KDP_PACKET_RECEIVED)
|
|
|
|
{
|
2009-10-27 23:38:56 +00:00
|
|
|
/* Didn't receive a PacketType. */
|
|
|
|
return KdStatus;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Check if we got a resend packet */
|
|
|
|
if (Packet.PacketLeader == CONTROL_PACKET_LEADER &&
|
|
|
|
Packet.PacketType == PACKET_TYPE_KD_RESEND)
|
|
|
|
{
|
|
|
|
return KDP_PACKET_RESEND;
|
2009-10-22 14:58:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Step 3 - Read ByteCount */
|
|
|
|
KdStatus = KdpReceiveBuffer(&Packet.ByteCount, sizeof(USHORT));
|
2009-10-27 23:38:56 +00:00
|
|
|
if (KdStatus != KDP_PACKET_RECEIVED)
|
2009-10-22 14:58:33 +00:00
|
|
|
{
|
2016-05-28 15:51:44 +00:00
|
|
|
/* Didn't receive ByteCount. */
|
2009-10-27 23:38:56 +00:00
|
|
|
return KdStatus;
|
2009-10-22 14:58:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Step 4 - Read PacketId */
|
|
|
|
KdStatus = KdpReceiveBuffer(&Packet.PacketId, sizeof(ULONG));
|
|
|
|
if (KdStatus != KDP_PACKET_RECEIVED)
|
|
|
|
{
|
2009-10-27 23:38:56 +00:00
|
|
|
/* Didn't receive PacketId. */
|
|
|
|
return KdStatus;
|
2009-10-22 14:58:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
if (Packet.PacketId != ExpectedPacketId)
|
|
|
|
{
|
|
|
|
// Ask for a resend!
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* Step 5 - Read Checksum */
|
|
|
|
KdStatus = KdpReceiveBuffer(&Packet.Checksum, sizeof(ULONG));
|
|
|
|
if (KdStatus != KDP_PACKET_RECEIVED)
|
|
|
|
{
|
2009-10-27 23:38:56 +00:00
|
|
|
/* Didn't receive Checksum. */
|
|
|
|
return KdStatus;
|
2009-10-22 14:58:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Step 6 - Handle control packets */
|
|
|
|
if (Packet.PacketLeader == CONTROL_PACKET_LEADER)
|
|
|
|
{
|
|
|
|
switch (Packet.PacketType)
|
|
|
|
{
|
|
|
|
case PACKET_TYPE_KD_ACKNOWLEDGE:
|
2011-06-27 16:51:00 +00:00
|
|
|
/* Are we waiting for an ACK packet? */
|
2009-10-22 14:58:33 +00:00
|
|
|
if (PacketType == PACKET_TYPE_KD_ACKNOWLEDGE &&
|
|
|
|
Packet.PacketId == (CurrentPacketId & ~SYNC_PACKET_ID))
|
|
|
|
{
|
|
|
|
/* Remote acknowledges the last packet */
|
|
|
|
CurrentPacketId ^= 1;
|
|
|
|
return KDP_PACKET_RECEIVED;
|
|
|
|
}
|
2015-12-25 18:43:16 +00:00
|
|
|
/* That's not what we were waiting for, start over */
|
2009-10-22 14:58:33 +00:00
|
|
|
continue;
|
|
|
|
|
|
|
|
case PACKET_TYPE_KD_RESET:
|
2015-12-25 18:43:16 +00:00
|
|
|
KDDBGPRINT("KdReceivePacket - got PACKET_TYPE_KD_RESET\n");
|
2016-05-28 15:51:44 +00:00
|
|
|
CurrentPacketId = INITIAL_PACKET_ID;
|
2016-05-28 15:54:44 +00:00
|
|
|
RemotePacketId = INITIAL_PACKET_ID;
|
|
|
|
KdpSendControlPacket(PACKET_TYPE_KD_RESET, 0);
|
2009-10-22 14:58:33 +00:00
|
|
|
/* Fall through */
|
|
|
|
|
|
|
|
case PACKET_TYPE_KD_RESEND:
|
|
|
|
KDDBGPRINT("KdReceivePacket - got PACKET_TYPE_KD_RESEND\n");
|
|
|
|
/* Remote wants us to resend the last packet */
|
|
|
|
return KDP_PACKET_RESEND;
|
|
|
|
|
|
|
|
default:
|
|
|
|
KDDBGPRINT("KdReceivePacket - got unknown control packet\n");
|
2016-05-28 15:51:44 +00:00
|
|
|
/* We got an invalid packet, ignore it and start over */
|
2015-12-25 18:43:16 +00:00
|
|
|
continue;
|
2009-10-22 14:58:33 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Did we wait for an ack packet? */
|
|
|
|
if (PacketType == PACKET_TYPE_KD_ACKNOWLEDGE)
|
|
|
|
{
|
|
|
|
/* We received something different */
|
|
|
|
KdpSendControlPacket(PACKET_TYPE_KD_RESEND, 0);
|
|
|
|
CurrentPacketId ^= 1;
|
|
|
|
return KDP_PACKET_RECEIVED;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Get size of the message header */
|
2009-10-27 23:38:56 +00:00
|
|
|
MessageHeader->Length = MessageHeader->MaximumLength;
|
2009-10-22 14:58:33 +00:00
|
|
|
|
2009-10-27 23:38:56 +00:00
|
|
|
/* Packet smaller than expected or too big? */
|
|
|
|
if (Packet.ByteCount < MessageHeader->Length ||
|
|
|
|
Packet.ByteCount > PACKET_MAX_SIZE)
|
2009-10-22 14:58:33 +00:00
|
|
|
{
|
|
|
|
KDDBGPRINT("KdReceivePacket - too few data (%d) for type %d\n",
|
|
|
|
Packet.ByteCount, MessageHeader->Length);
|
|
|
|
MessageHeader->Length = Packet.ByteCount;
|
2009-10-27 23:38:56 +00:00
|
|
|
KdpSendControlPacket(PACKET_TYPE_KD_RESEND, 0);
|
|
|
|
continue;
|
2009-10-22 14:58:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
//KDDBGPRINT("KdReceivePacket - got normal PacketType, Buffer = %p\n", MessageHeader->Buffer);
|
|
|
|
|
|
|
|
/* Receive the message header data */
|
|
|
|
KdStatus = KdpReceiveBuffer(MessageHeader->Buffer,
|
2016-05-28 15:54:44 +00:00
|
|
|
MessageHeader->Length);
|
2009-10-22 14:58:33 +00:00
|
|
|
if (KdStatus != KDP_PACKET_RECEIVED)
|
|
|
|
{
|
|
|
|
/* Didn't receive data. Packet needs to be resent. */
|
|
|
|
KDDBGPRINT("KdReceivePacket - Didn't receive message header data.\n");
|
|
|
|
KdpSendControlPacket(PACKET_TYPE_KD_RESEND, 0);
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
|
|
|
//KDDBGPRINT("KdReceivePacket - got normal PacketType 3\n");
|
|
|
|
|
|
|
|
/* Calculate checksum for the header data */
|
|
|
|
Checksum = KdpCalculateChecksum(MessageHeader->Buffer,
|
|
|
|
MessageHeader->Length);
|
|
|
|
|
|
|
|
/* Calculate the length of the message data */
|
|
|
|
*DataLength = Packet.ByteCount - MessageHeader->Length;
|
|
|
|
|
2016-11-13 15:31:39 +00:00
|
|
|
/* Shall we receive message data? */
|
2009-10-22 14:58:33 +00:00
|
|
|
if (MessageData)
|
|
|
|
{
|
|
|
|
/* Set the length of the message data */
|
2011-06-27 16:51:00 +00:00
|
|
|
MessageData->Length = (USHORT)*DataLength;
|
2009-10-22 14:58:33 +00:00
|
|
|
|
|
|
|
/* Do we have data? */
|
|
|
|
if (MessageData->Length)
|
|
|
|
{
|
2016-05-28 15:51:44 +00:00
|
|
|
KDDBGPRINT("KdReceivePacket - got data\n");
|
2009-10-22 14:58:33 +00:00
|
|
|
|
|
|
|
/* Receive the message data */
|
|
|
|
KdStatus = KdpReceiveBuffer(MessageData->Buffer,
|
|
|
|
MessageData->Length);
|
|
|
|
if (KdStatus != KDP_PACKET_RECEIVED)
|
|
|
|
{
|
|
|
|
/* Didn't receive data. Start over. */
|
|
|
|
KDDBGPRINT("KdReceivePacket - Didn't receive message data.\n");
|
|
|
|
KdpSendControlPacket(PACKET_TYPE_KD_RESEND, 0);
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Add cheksum for message data */
|
|
|
|
Checksum += KdpCalculateChecksum(MessageData->Buffer,
|
|
|
|
MessageData->Length);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2009-10-27 23:38:56 +00:00
|
|
|
/* We must receive a PACKET_TRAILING_BYTE now */
|
|
|
|
KdStatus = KdpReceiveBuffer(&Byte, sizeof(UCHAR));
|
|
|
|
if (KdStatus != KDP_PACKET_RECEIVED || Byte != PACKET_TRAILING_BYTE)
|
2009-10-22 14:58:33 +00:00
|
|
|
{
|
2009-10-27 23:38:56 +00:00
|
|
|
KDDBGPRINT("KdReceivePacket - wrong trailing byte (0x%x), status 0x%x\n", Byte, KdStatus);
|
2009-10-22 14:58:33 +00:00
|
|
|
KdpSendControlPacket(PACKET_TYPE_KD_RESEND, 0);
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
2009-10-27 23:38:56 +00:00
|
|
|
/* Compare checksum */
|
|
|
|
if (Packet.Checksum != Checksum)
|
2009-10-22 14:58:33 +00:00
|
|
|
{
|
2009-10-27 23:38:56 +00:00
|
|
|
KDDBGPRINT("KdReceivePacket - wrong cheksum, got %x, calculated %x\n",
|
2016-05-28 15:54:44 +00:00
|
|
|
Packet.Checksum, Checksum);
|
2016-05-28 15:46:49 +00:00
|
|
|
KdpSendControlPacket(PACKET_TYPE_KD_RESEND, 0);
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
2009-10-22 14:58:33 +00:00
|
|
|
/* Acknowledge the received packet */
|
|
|
|
KdpSendControlPacket(PACKET_TYPE_KD_ACKNOWLEDGE, Packet.PacketId);
|
|
|
|
|
2009-10-27 23:38:56 +00:00
|
|
|
/* Check if the received PacketId is ok */
|
|
|
|
if (Packet.PacketId != RemotePacketId)
|
|
|
|
{
|
|
|
|
/* Continue with next packet */
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Did we get the right packet type? */
|
|
|
|
if (PacketType == Packet.PacketType)
|
|
|
|
{
|
|
|
|
/* Yes, return success */
|
|
|
|
//KDDBGPRINT("KdReceivePacket - all ok\n");
|
|
|
|
RemotePacketId ^= 1;
|
|
|
|
return KDP_PACKET_RECEIVED;
|
|
|
|
}
|
2009-10-22 14:58:33 +00:00
|
|
|
|
2009-10-27 23:38:56 +00:00
|
|
|
/* We received something different, ignore it. */
|
|
|
|
KDDBGPRINT("KdReceivePacket - wrong PacketType\n");
|
2009-10-22 14:58:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return KDP_PACKET_RECEIVED;
|
|
|
|
}
|
|
|
|
|
|
|
|
VOID
|
|
|
|
NTAPI
|
|
|
|
KdSendPacket(
|
|
|
|
IN ULONG PacketType,
|
|
|
|
IN PSTRING MessageHeader,
|
|
|
|
IN PSTRING MessageData,
|
2009-10-27 23:38:56 +00:00
|
|
|
IN OUT PKD_CONTEXT KdContext)
|
2009-10-22 14:58:33 +00:00
|
|
|
{
|
|
|
|
KD_PACKET Packet;
|
|
|
|
KDP_STATUS KdStatus;
|
2009-10-27 23:38:56 +00:00
|
|
|
ULONG Retries;
|
2009-10-22 14:58:33 +00:00
|
|
|
|
|
|
|
/* Initialize a KD_PACKET */
|
|
|
|
Packet.PacketLeader = PACKET_LEADER;
|
2011-06-27 16:51:00 +00:00
|
|
|
Packet.PacketType = (USHORT)PacketType;
|
2009-10-22 14:58:33 +00:00
|
|
|
Packet.ByteCount = MessageHeader->Length;
|
|
|
|
Packet.Checksum = KdpCalculateChecksum(MessageHeader->Buffer,
|
|
|
|
MessageHeader->Length);
|
|
|
|
|
|
|
|
/* If we have message data, add it to the packet */
|
|
|
|
if (MessageData)
|
|
|
|
{
|
|
|
|
Packet.ByteCount += MessageData->Length;
|
|
|
|
Packet.Checksum += KdpCalculateChecksum(MessageData->Buffer,
|
|
|
|
MessageData->Length);
|
|
|
|
}
|
|
|
|
|
2009-10-27 23:38:56 +00:00
|
|
|
Retries = KdContext->KdpDefaultRetries;
|
|
|
|
|
2013-04-23 00:41:45 +00:00
|
|
|
for (;;)
|
2009-10-22 14:58:33 +00:00
|
|
|
{
|
|
|
|
/* Set the packet id */
|
|
|
|
Packet.PacketId = CurrentPacketId;
|
|
|
|
|
|
|
|
/* Send the packet header to the KD port */
|
|
|
|
KdpSendBuffer(&Packet, sizeof(KD_PACKET));
|
|
|
|
|
|
|
|
/* Send the message header */
|
|
|
|
KdpSendBuffer(MessageHeader->Buffer, MessageHeader->Length);
|
|
|
|
|
2016-11-13 15:31:39 +00:00
|
|
|
/* If we have message data, also send it */
|
2013-04-23 00:41:45 +00:00
|
|
|
if (MessageData)
|
|
|
|
{
|
|
|
|
KdpSendBuffer(MessageData->Buffer, MessageData->Length);
|
|
|
|
}
|
2009-10-22 14:58:33 +00:00
|
|
|
|
|
|
|
/* Finalize with a trailing byte */
|
|
|
|
KdpSendByte(PACKET_TRAILING_BYTE);
|
|
|
|
|
|
|
|
/* Wait for acknowledge */
|
|
|
|
KdStatus = KdReceivePacket(PACKET_TYPE_KD_ACKNOWLEDGE,
|
2009-10-27 23:38:56 +00:00
|
|
|
NULL,
|
|
|
|
NULL,
|
2013-04-21 23:39:05 +00:00
|
|
|
NULL,
|
2009-10-27 23:38:56 +00:00
|
|
|
KdContext);
|
2013-04-23 00:41:45 +00:00
|
|
|
|
|
|
|
/* Did we succeed? */
|
|
|
|
if (KdStatus == KDP_PACKET_RECEIVED)
|
|
|
|
{
|
|
|
|
/* Packet received, we can quit the loop */
|
|
|
|
CurrentPacketId &= ~SYNC_PACKET_ID;
|
2016-05-28 15:51:44 +00:00
|
|
|
Retries = KdContext->KdpDefaultRetries;
|
2013-04-23 00:41:45 +00:00
|
|
|
break;
|
|
|
|
}
|
2016-05-28 15:51:44 +00:00
|
|
|
else if (KdStatus == KDP_PACKET_TIMEOUT)
|
2009-10-27 23:38:56 +00:00
|
|
|
{
|
2013-04-23 00:41:45 +00:00
|
|
|
/* Timeout, decrement the retry count */
|
2016-05-28 15:51:44 +00:00
|
|
|
if (Retries > 0)
|
|
|
|
Retries--;
|
2013-04-23 00:41:45 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* If the retry count reaches zero, bail out
|
|
|
|
* for packet types allowed to timeout.
|
|
|
|
*/
|
2016-05-28 15:51:44 +00:00
|
|
|
if (Retries == 0)
|
2013-04-23 00:41:45 +00:00
|
|
|
{
|
2016-05-28 15:51:44 +00:00
|
|
|
ULONG MessageId = *(PULONG)MessageHeader->Buffer;
|
|
|
|
switch (PacketType)
|
|
|
|
{
|
|
|
|
case PACKET_TYPE_KD_DEBUG_IO:
|
|
|
|
{
|
|
|
|
if (MessageId != DbgKdPrintStringApi) continue;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
case PACKET_TYPE_KD_STATE_CHANGE32:
|
|
|
|
case PACKET_TYPE_KD_STATE_CHANGE64:
|
|
|
|
{
|
|
|
|
if (MessageId != DbgKdLoadSymbolsStateChange) continue;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
case PACKET_TYPE_KD_FILE_IO:
|
|
|
|
{
|
|
|
|
if (MessageId != DbgKdCreateFileApi) continue;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
2015-12-25 18:43:16 +00:00
|
|
|
|
|
|
|
/* Reset debugger state */
|
|
|
|
KD_DEBUGGER_NOT_PRESENT = TRUE;
|
|
|
|
SharedUserData->KdDebuggerEnabled &= ~0x00000002;
|
|
|
|
CurrentPacketId = INITIAL_PACKET_ID | SYNC_PACKET_ID;
|
2016-05-28 15:51:44 +00:00
|
|
|
RemotePacketId = INITIAL_PACKET_ID;
|
|
|
|
|
2015-12-25 18:43:16 +00:00
|
|
|
return;
|
2013-04-23 00:41:45 +00:00
|
|
|
}
|
2009-10-27 23:38:56 +00:00
|
|
|
}
|
2016-05-28 15:51:44 +00:00
|
|
|
// else (KdStatus == KDP_PACKET_RESEND) /* Resend the packet */
|
2009-10-27 23:38:56 +00:00
|
|
|
|
2009-10-22 14:58:33 +00:00
|
|
|
/* Packet timed out, send it again */
|
2009-10-27 23:38:56 +00:00
|
|
|
KDDBGPRINT("KdSendPacket got KdStatus 0x%x\n", KdStatus);
|
2013-04-23 00:41:45 +00:00
|
|
|
}
|
2009-10-22 14:58:33 +00:00
|
|
|
}
|
|
|
|
|
2016-05-28 15:51:44 +00:00
|
|
|
/* EOF */
|