mirror of
https://github.com/reactos/reactos.git
synced 2025-07-02 03:41:22 +00:00
Revert a mistake commit...
svn path=/trunk/; revision=71437
This commit is contained in:
parent
5917e9e09d
commit
c6a6ac928a
1 changed files with 46 additions and 184 deletions
|
@ -8,19 +8,11 @@
|
||||||
|
|
||||||
#include "kddll.h"
|
#include "kddll.h"
|
||||||
|
|
||||||
#define _FULL_ 1
|
|
||||||
#define _WORKS_ 0
|
|
||||||
#define _WORKS2_ 0
|
|
||||||
|
|
||||||
/* GLOBALS ********************************************************************/
|
/* GLOBALS ********************************************************************/
|
||||||
|
|
||||||
ULONG CurrentPacketId = INITIAL_PACKET_ID | SYNC_PACKET_ID;
|
ULONG CurrentPacketId = INITIAL_PACKET_ID | SYNC_PACKET_ID;
|
||||||
ULONG RemotePacketId = INITIAL_PACKET_ID;
|
ULONG RemotePacketId = INITIAL_PACKET_ID;
|
||||||
|
|
||||||
#if _FULL_
|
|
||||||
ULONG KdCompNumberRetries = 5;
|
|
||||||
ULONG KdCompRetryCount = 5;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* PRIVATE FUNCTIONS **********************************************************/
|
/* PRIVATE FUNCTIONS **********************************************************/
|
||||||
|
|
||||||
|
@ -38,13 +30,13 @@ KdpCalculateChecksum(
|
||||||
IN PVOID Buffer,
|
IN PVOID Buffer,
|
||||||
IN ULONG Length)
|
IN ULONG Length)
|
||||||
{
|
{
|
||||||
ULONG i, Checksum = 0;
|
PUCHAR ByteBuffer = Buffer;
|
||||||
|
ULONG Checksum = 0;
|
||||||
|
|
||||||
for (i = 0; i < Length; i++)
|
while (Length-- > 0)
|
||||||
{
|
{
|
||||||
Checksum += ((PUCHAR)Buffer)[i];
|
Checksum += (ULONG)*ByteBuffer++;
|
||||||
}
|
}
|
||||||
|
|
||||||
return Checksum;
|
return Checksum;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -68,36 +60,6 @@ KdpSendControlPacket(
|
||||||
|
|
||||||
/* PUBLIC FUNCTIONS ***********************************************************/
|
/* PUBLIC FUNCTIONS ***********************************************************/
|
||||||
|
|
||||||
NTSTATUS
|
|
||||||
NTAPI
|
|
||||||
KdD0Transition(VOID)
|
|
||||||
{
|
|
||||||
return STATUS_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
NTSTATUS
|
|
||||||
NTAPI
|
|
||||||
KdD3Transition(VOID)
|
|
||||||
{
|
|
||||||
return STATUS_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/******************************************************************************
|
|
||||||
* \name KdDebuggerInitialize1
|
|
||||||
* \brief Phase 1 initialization.
|
|
||||||
* \param [opt] LoaderBlock Pointer to the Loader parameter block. Can be NULL.
|
|
||||||
* \return Status
|
|
||||||
*/
|
|
||||||
NTSTATUS
|
|
||||||
NTAPI
|
|
||||||
KdDebuggerInitialize1(
|
|
||||||
IN PLOADER_PARAMETER_BLOCK LoaderBlock OPTIONAL)
|
|
||||||
{
|
|
||||||
return STATUS_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
* \name KdReceivePacket
|
* \name KdReceivePacket
|
||||||
* \brief Receive a packet from the KD port.
|
* \brief Receive a packet from the KD port.
|
||||||
|
@ -128,36 +90,21 @@ KdReceivePacket(
|
||||||
ULONG Checksum;
|
ULONG Checksum;
|
||||||
|
|
||||||
/* Special handling for breakin packet */
|
/* Special handling for breakin packet */
|
||||||
if (PacketType == PACKET_TYPE_KD_POLL_BREAKIN)
|
if(PacketType == PACKET_TYPE_KD_POLL_BREAKIN)
|
||||||
{
|
{
|
||||||
return KdpPollBreakIn();
|
return KdpPollBreakIn();
|
||||||
}
|
}
|
||||||
|
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
#if _FULL_ || _WORKS2_
|
|
||||||
if (KdContext)
|
|
||||||
{
|
|
||||||
KdContext->KdpControlCPending = FALSE;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
/* Step 1 - Read PacketLeader */
|
/* Step 1 - Read PacketLeader */
|
||||||
KdStatus = KdpReceivePacketLeader(&Packet.PacketLeader);
|
KdStatus = KdpReceivePacketLeader(&Packet.PacketLeader);
|
||||||
#if _FULL_
|
|
||||||
if (KdStatus != KDP_PACKET_TIMEOUT)
|
|
||||||
{
|
|
||||||
// KdCompNumberRetries = KdCompRetryCount;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
if (KdStatus != KDP_PACKET_RECEIVED)
|
if (KdStatus != KDP_PACKET_RECEIVED)
|
||||||
{
|
{
|
||||||
/* Check if we got a breakin */
|
/* Check if we got a breakin */
|
||||||
if (KdStatus == KDP_PACKET_RESEND)
|
if (KdStatus == KDP_PACKET_RESEND)
|
||||||
{
|
{
|
||||||
#if _FULL_ || _WORKS2_ || _PATCH_
|
KdContext->KdpControlCPending = TRUE;
|
||||||
if (KdContext)
|
|
||||||
#endif
|
|
||||||
KdContext->KdpControlCPending = TRUE;
|
|
||||||
}
|
}
|
||||||
return KdStatus;
|
return KdStatus;
|
||||||
}
|
}
|
||||||
|
@ -167,37 +114,22 @@ KdReceivePacket(
|
||||||
if (KdStatus != KDP_PACKET_RECEIVED)
|
if (KdStatus != KDP_PACKET_RECEIVED)
|
||||||
{
|
{
|
||||||
/* Didn't receive a PacketType. */
|
/* Didn't receive a PacketType. */
|
||||||
KDDBGPRINT("KdReceivePacket - Didn't receive a PacketType.\n");
|
|
||||||
#if _WORKS_
|
|
||||||
continue;
|
|
||||||
#else
|
|
||||||
return KdStatus;
|
return KdStatus;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check if we got a resend packet */
|
/* Check if we got a resend packet */
|
||||||
if (Packet.PacketLeader == CONTROL_PACKET_LEADER &&
|
if (Packet.PacketLeader == CONTROL_PACKET_LEADER &&
|
||||||
Packet.PacketType == PACKET_TYPE_KD_RESEND)
|
Packet.PacketType == PACKET_TYPE_KD_RESEND)
|
||||||
{
|
{
|
||||||
KDDBGPRINT("KdReceivePacket - PACKET_TYPE_KD_RESEND.\n");
|
|
||||||
return KDP_PACKET_RESEND;
|
return KDP_PACKET_RESEND;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Step 3 - Read ByteCount */
|
/* Step 3 - Read ByteCount */
|
||||||
KdStatus = KdpReceiveBuffer(&Packet.ByteCount, sizeof(USHORT));
|
KdStatus = KdpReceiveBuffer(&Packet.ByteCount, sizeof(USHORT));
|
||||||
#if _WORKS_
|
|
||||||
if (KdStatus != KDP_PACKET_RECEIVED || Packet.ByteCount > PACKET_MAX_SIZE)
|
|
||||||
#else
|
|
||||||
if (KdStatus != KDP_PACKET_RECEIVED)
|
if (KdStatus != KDP_PACKET_RECEIVED)
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
/* Didn't receive ByteCount _WORKS_: or it's too big. Start over. */
|
/* Didn't receive ByteCount. */
|
||||||
KDDBGPRINT("KdReceivePacket - Didn't receive ByteCount.\n");
|
|
||||||
#if _WORKS_
|
|
||||||
continue;
|
|
||||||
#else
|
|
||||||
return KdStatus;
|
return KdStatus;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Step 4 - Read PacketId */
|
/* Step 4 - Read PacketId */
|
||||||
|
@ -205,12 +137,7 @@ KdReceivePacket(
|
||||||
if (KdStatus != KDP_PACKET_RECEIVED)
|
if (KdStatus != KDP_PACKET_RECEIVED)
|
||||||
{
|
{
|
||||||
/* Didn't receive PacketId. */
|
/* Didn't receive PacketId. */
|
||||||
KDDBGPRINT("KdReceivePacket - Didn't receive PacketId.\n");
|
|
||||||
#if _WORKS_
|
|
||||||
continue;
|
|
||||||
#else
|
|
||||||
return KdStatus;
|
return KdStatus;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -226,12 +153,7 @@ KdReceivePacket(
|
||||||
if (KdStatus != KDP_PACKET_RECEIVED)
|
if (KdStatus != KDP_PACKET_RECEIVED)
|
||||||
{
|
{
|
||||||
/* Didn't receive Checksum. */
|
/* Didn't receive Checksum. */
|
||||||
KDDBGPRINT("KdReceivePacket - Didn't receive Checksum.\n");
|
|
||||||
#if _WORKS_
|
|
||||||
continue;
|
|
||||||
#else
|
|
||||||
return KdStatus;
|
return KdStatus;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Step 6 - Handle control packets */
|
/* Step 6 - Handle control packets */
|
||||||
|
@ -253,9 +175,9 @@ KdReceivePacket(
|
||||||
|
|
||||||
case PACKET_TYPE_KD_RESET:
|
case PACKET_TYPE_KD_RESET:
|
||||||
KDDBGPRINT("KdReceivePacket - got PACKET_TYPE_KD_RESET\n");
|
KDDBGPRINT("KdReceivePacket - got PACKET_TYPE_KD_RESET\n");
|
||||||
CurrentPacketId = INITIAL_PACKET_ID;
|
|
||||||
RemotePacketId = INITIAL_PACKET_ID;
|
|
||||||
KdpSendControlPacket(PACKET_TYPE_KD_RESET, 0);
|
KdpSendControlPacket(PACKET_TYPE_KD_RESET, 0);
|
||||||
|
CurrentPacketId = INITIAL_PACKET_ID;
|
||||||
|
RemotePacketId = INITIAL_PACKET_ID;
|
||||||
/* Fall through */
|
/* Fall through */
|
||||||
|
|
||||||
case PACKET_TYPE_KD_RESEND:
|
case PACKET_TYPE_KD_RESEND:
|
||||||
|
@ -265,11 +187,8 @@ KdReceivePacket(
|
||||||
|
|
||||||
default:
|
default:
|
||||||
KDDBGPRINT("KdReceivePacket - got unknown control packet\n");
|
KDDBGPRINT("KdReceivePacket - got unknown control packet\n");
|
||||||
#if _FULL_
|
/* We got an invalid packet, ignore it and start over */
|
||||||
continue;
|
continue;
|
||||||
#else
|
|
||||||
return KDP_PACKET_RESEND;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -277,56 +196,17 @@ KdReceivePacket(
|
||||||
if (PacketType == PACKET_TYPE_KD_ACKNOWLEDGE)
|
if (PacketType == PACKET_TYPE_KD_ACKNOWLEDGE)
|
||||||
{
|
{
|
||||||
/* We received something different */
|
/* We received something different */
|
||||||
#if _FULL_ || _WORKS2_
|
|
||||||
if (Packet.PacketId != RemotePacketId)
|
|
||||||
{
|
|
||||||
KdpSendControlPacket(PACKET_TYPE_KD_ACKNOWLEDGE,
|
|
||||||
Packet.PacketId);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
#elif _PATCH_
|
|
||||||
DBGKD_MANIPULATE_STATE64 State;
|
|
||||||
KdStatus = KdpReceiveBuffer(&State, sizeof(State));
|
|
||||||
KDDBGPRINT("KdReceivePacket - unxpected Packet.PacketType=0x%x, 0x%x, 0x%x\n",
|
|
||||||
Packet.PacketType, Packet.Checksum, State.ApiNumber);
|
|
||||||
#endif
|
|
||||||
KdpSendControlPacket(PACKET_TYPE_KD_RESEND, 0);
|
KdpSendControlPacket(PACKET_TYPE_KD_RESEND, 0);
|
||||||
CurrentPacketId ^= 1;
|
CurrentPacketId ^= 1;
|
||||||
return KDP_PACKET_RECEIVED;
|
return KDP_PACKET_RECEIVED;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Get size of the message header */
|
/* Get size of the message header */
|
||||||
#if _WORKS_
|
|
||||||
switch (Packet.PacketType)
|
|
||||||
{
|
|
||||||
case PACKET_TYPE_KD_STATE_CHANGE64:
|
|
||||||
MessageHeader->Length = sizeof(DBGKD_WAIT_STATE_CHANGE64);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case PACKET_TYPE_KD_STATE_MANIPULATE:
|
|
||||||
MessageHeader->Length = sizeof(DBGKD_MANIPULATE_STATE64);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case PACKET_TYPE_KD_DEBUG_IO:
|
|
||||||
MessageHeader->Length = sizeof(DBGKD_DEBUG_IO);
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
KDDBGPRINT("KdReceivePacket - unknown PacketType\n");
|
|
||||||
return KDP_PACKET_RESEND;
|
|
||||||
}
|
|
||||||
|
|
||||||
//KDDBGPRINT("KdReceivePacket - got normal PacketType\n");
|
|
||||||
|
|
||||||
/* Packet smaller than expected? */
|
|
||||||
if (MessageHeader->Length > Packet.ByteCount)
|
|
||||||
#else
|
|
||||||
MessageHeader->Length = MessageHeader->MaximumLength;
|
MessageHeader->Length = MessageHeader->MaximumLength;
|
||||||
|
|
||||||
/* Packet smaller than expected or too big? */
|
/* Packet smaller than expected or too big? */
|
||||||
if (Packet.ByteCount < MessageHeader->Length ||
|
if (Packet.ByteCount < MessageHeader->Length ||
|
||||||
Packet.ByteCount > PACKET_MAX_SIZE)
|
Packet.ByteCount > PACKET_MAX_SIZE)
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
KDDBGPRINT("KdReceivePacket - too few data (%d) for type %d\n",
|
KDDBGPRINT("KdReceivePacket - too few data (%d) for type %d\n",
|
||||||
Packet.ByteCount, MessageHeader->Length);
|
Packet.ByteCount, MessageHeader->Length);
|
||||||
|
@ -338,11 +218,8 @@ KdReceivePacket(
|
||||||
//KDDBGPRINT("KdReceivePacket - got normal PacketType, Buffer = %p\n", MessageHeader->Buffer);
|
//KDDBGPRINT("KdReceivePacket - got normal PacketType, Buffer = %p\n", MessageHeader->Buffer);
|
||||||
|
|
||||||
/* Receive the message header data */
|
/* Receive the message header data */
|
||||||
#if _WORKS2_
|
|
||||||
MessageHeader->Length = MessageHeader->MaximumLength;
|
|
||||||
#endif
|
|
||||||
KdStatus = KdpReceiveBuffer(MessageHeader->Buffer,
|
KdStatus = KdpReceiveBuffer(MessageHeader->Buffer,
|
||||||
MessageHeader->Length);
|
MessageHeader->Length);
|
||||||
if (KdStatus != KDP_PACKET_RECEIVED)
|
if (KdStatus != KDP_PACKET_RECEIVED)
|
||||||
{
|
{
|
||||||
/* Didn't receive data. Packet needs to be resent. */
|
/* Didn't receive data. Packet needs to be resent. */
|
||||||
|
@ -369,7 +246,7 @@ KdReceivePacket(
|
||||||
/* Do we have data? */
|
/* Do we have data? */
|
||||||
if (MessageData->Length)
|
if (MessageData->Length)
|
||||||
{
|
{
|
||||||
KDDBGPRINT("KdReceivePacket - 0x%lx bytes data\n", *DataLength);
|
KDDBGPRINT("KdReceivePacket - got data\n");
|
||||||
|
|
||||||
/* Receive the message data */
|
/* Receive the message data */
|
||||||
KdStatus = KdpReceiveBuffer(MessageData->Buffer,
|
KdStatus = KdpReceiveBuffer(MessageData->Buffer,
|
||||||
|
@ -401,20 +278,11 @@ KdReceivePacket(
|
||||||
if (Packet.Checksum != Checksum)
|
if (Packet.Checksum != Checksum)
|
||||||
{
|
{
|
||||||
KDDBGPRINT("KdReceivePacket - wrong cheksum, got %x, calculated %x\n",
|
KDDBGPRINT("KdReceivePacket - wrong cheksum, got %x, calculated %x\n",
|
||||||
Packet.Checksum, Checksum);
|
Packet.Checksum, Checksum);
|
||||||
KdpSendControlPacket(PACKET_TYPE_KD_RESEND, 0);
|
KdpSendControlPacket(PACKET_TYPE_KD_RESEND, 0);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if _FULL_ || _WORKS2_
|
|
||||||
if (Packet.PacketId != INITIAL_PACKET_ID &&
|
|
||||||
Packet.PacketId != (INITIAL_PACKET_ID ^ 1))
|
|
||||||
{
|
|
||||||
KdpSendControlPacket(PACKET_TYPE_KD_RESEND, 0);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Acknowledge the received packet */
|
/* Acknowledge the received packet */
|
||||||
KdpSendControlPacket(PACKET_TYPE_KD_ACKNOWLEDGE, Packet.PacketId);
|
KdpSendControlPacket(PACKET_TYPE_KD_ACKNOWLEDGE, Packet.PacketId);
|
||||||
|
|
||||||
|
@ -422,7 +290,6 @@ KdReceivePacket(
|
||||||
if (Packet.PacketId != RemotePacketId)
|
if (Packet.PacketId != RemotePacketId)
|
||||||
{
|
{
|
||||||
/* Continue with next packet */
|
/* Continue with next packet */
|
||||||
KDDBGPRINT("KdReceivePacket - Wrong PacketId.\n");
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -442,28 +309,6 @@ KdReceivePacket(
|
||||||
return KDP_PACKET_RECEIVED;
|
return KDP_PACKET_RECEIVED;
|
||||||
}
|
}
|
||||||
|
|
||||||
static
|
|
||||||
BOOLEAN
|
|
||||||
IsQuickTimeoutAllowed(
|
|
||||||
IN ULONG PacketType,
|
|
||||||
IN PSTRING MessageHeader)
|
|
||||||
{
|
|
||||||
PDBGKD_DEBUG_IO DebugIo = (PDBGKD_DEBUG_IO)MessageHeader->Buffer;
|
|
||||||
ULONG ApiNumber = DebugIo->ApiNumber;
|
|
||||||
|
|
||||||
if ( ((PacketType == PACKET_TYPE_KD_DEBUG_IO) &&
|
|
||||||
((ApiNumber == DbgKdPrintStringApi))) ||
|
|
||||||
((PacketType == PACKET_TYPE_KD_FILE_IO) &&
|
|
||||||
((ApiNumber == DbgKdCreateFileApi))) ||
|
|
||||||
((PacketType == PACKET_TYPE_KD_STATE_CHANGE64) &&
|
|
||||||
((ApiNumber == DbgKdLoadSymbolsStateChange))) )
|
|
||||||
{
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
NTAPI
|
NTAPI
|
||||||
KdSendPacket(
|
KdSendPacket(
|
||||||
|
@ -491,11 +336,7 @@ KdSendPacket(
|
||||||
MessageData->Length);
|
MessageData->Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if _FULL_
|
|
||||||
Retries = KdCompNumberRetries = KdCompRetryCount;
|
|
||||||
#else
|
|
||||||
Retries = KdContext->KdpDefaultRetries;
|
Retries = KdContext->KdpDefaultRetries;
|
||||||
#endif
|
|
||||||
|
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
|
@ -508,7 +349,7 @@ KdSendPacket(
|
||||||
/* Send the message header */
|
/* Send the message header */
|
||||||
KdpSendBuffer(MessageHeader->Buffer, MessageHeader->Length);
|
KdpSendBuffer(MessageHeader->Buffer, MessageHeader->Length);
|
||||||
|
|
||||||
/* If we have message data, also send it */
|
/* If we have meesage data, also send it */
|
||||||
if (MessageData)
|
if (MessageData)
|
||||||
{
|
{
|
||||||
KdpSendBuffer(MessageData->Buffer, MessageData->Length);
|
KdpSendBuffer(MessageData->Buffer, MessageData->Length);
|
||||||
|
@ -529,37 +370,58 @@ KdSendPacket(
|
||||||
{
|
{
|
||||||
/* Packet received, we can quit the loop */
|
/* Packet received, we can quit the loop */
|
||||||
CurrentPacketId &= ~SYNC_PACKET_ID;
|
CurrentPacketId &= ~SYNC_PACKET_ID;
|
||||||
|
Retries = KdContext->KdpDefaultRetries;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
else if (KdStatus == KDP_PACKET_TIMEOUT)
|
||||||
if (KdStatus == KDP_PACKET_TIMEOUT)
|
|
||||||
{
|
{
|
||||||
/* Timeout, decrement the retry count */
|
/* Timeout, decrement the retry count */
|
||||||
Retries--;
|
if (Retries > 0)
|
||||||
|
Retries--;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If the retry count reaches zero, bail out
|
* If the retry count reaches zero, bail out
|
||||||
* for packet types allowed to timeout.
|
* for packet types allowed to timeout.
|
||||||
*/
|
*/
|
||||||
if ((Retries == 0) &&
|
if (Retries == 0)
|
||||||
IsQuickTimeoutAllowed(PacketType, MessageHeader))
|
|
||||||
{
|
{
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Reset debugger state */
|
/* Reset debugger state */
|
||||||
KD_DEBUGGER_NOT_PRESENT = TRUE;
|
KD_DEBUGGER_NOT_PRESENT = TRUE;
|
||||||
SharedUserData->KdDebuggerEnabled &= ~0x00000002;
|
SharedUserData->KdDebuggerEnabled &= ~0x00000002;
|
||||||
CurrentPacketId = INITIAL_PACKET_ID | SYNC_PACKET_ID;
|
CurrentPacketId = INITIAL_PACKET_ID | SYNC_PACKET_ID;
|
||||||
RemotePacketId = INITIAL_PACKET_ID;
|
RemotePacketId = INITIAL_PACKET_ID;
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// else (KdStatus == KDP_PACKET_RESEND) /* Resend the packet */
|
||||||
|
|
||||||
/* Packet timed out, send it again */
|
/* Packet timed out, send it again */
|
||||||
KDDBGPRINT("KdSendPacket got KdStatus 0x%x\n", KdStatus);
|
KDDBGPRINT("KdSendPacket got KdStatus 0x%x\n", KdStatus);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if _FULL_
|
|
||||||
KdCompNumberRetries = Retries;
|
|
||||||
#endif // _FULL_
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* EOF */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue