#include "stdafx.h"
#include "kdxxx.h"
#include "vmwrpc.h"
#include "kdvmware.h"
#include "kdrpc.h"

Classes | |
| class | InterlockedIncrementer |
| Provides convenient way to mark whether a code block is executing by using an global volatile counter. More... | |
Defines | |
| #define | CONNECTION_TEST_ROUNDS 100 |
Typedefs | |
| typedef BufferedRPCChannel < g_PacketBuffer, sizeof(g_PacketBuffer)> | DefaultRPCChannel |
Functions | |
| void | HalInitSystem (void *, void *) |
| void __stdcall | DllEntryPoint () |
| ULONG | KdVmwareGetActiveCallCount () |
| static bool | TestConnectionOnChannel (DefaultRPCChannel &chn) |
| bool | TestConnectionWithHost () |
| NTSTATUS | NegotiateProtocolVersions () |
| NTSTATUS __stdcall | KdDebuggerInitialize0 (PVOID lpLoaderParameterBlock) |
| Performs initial KD extension DLL initialization. | |
| KD_RECV_CODE __stdcall | KdReceivePacket (__in ULONG PacketType, __inout_opt PKD_BUFFER FirstBuffer, __inout_opt PKD_BUFFER SecondBuffer, __out_opt PULONG PayloadBytes, __inout_opt PKD_CONTEXT KdContext) |
| Called by kernel to receive a packet of a specified type. | |
| VOID __stdcall | KdSendPacket (__in ULONG PacketType, __in PKD_BUFFER FirstBuffer, __in_opt PKD_BUFFER SecondBuffer, __inout PKD_CONTEXT KdContext) |
| Called by kernel to send a debug packet. | |
Variables | |
| static KD_BUFFER | s_EmptyBuffer |
| static KD_CONTEXT | s_EmptyKdContext |
| volatile LONG | KdVmwareActiveCallCount = 0 |
| #define CONNECTION_TEST_ROUNDS 100 |
| typedef BufferedRPCChannel<g_PacketBuffer, sizeof(g_PacketBuffer)> DefaultRPCChannel |
| void __stdcall DllEntryPoint | ( | ) |

| void HalInitSystem | ( | void * | , | |
| void * | ||||
| ) |
| NTSTATUS __stdcall KdDebuggerInitialize0 | ( | PVOID | lpLoaderParameterBlock | ) |
Performs initial KD extension DLL initialization.

| KD_RECV_CODE __stdcall KdReceivePacket | ( | __in ULONG | PacketType, | |
| __inout_opt PKD_BUFFER | FirstBuffer, | |||
| __inout_opt PKD_BUFFER | SecondBuffer, | |||
| __out_opt PULONG | PayloadBytes, | |||
| __inout_opt PKD_CONTEXT | KdContext | |||
| ) |
Called by kernel to receive a packet of a specified type.
This function is called by Windows kernel to receive a debug packet of a particular type.
| PacketType | Specifies the type of packet to receive. If KdCheckForAnyPacket is specified, the function checks whether any data is available (was sent by debugger, but not yet received) and returns KD_RECV_CODE_OK or KD_RECV_CODE_TIMEOUT respectively without performing any other action. | |
| FirstBuffer | Specifies the buffer where the first KD_BUFFER::MaxLength bytes of a packet are stored | |
| SecondBuffer | Specifies the buffer where the rest data of the packet is stored. | |
| PayloadBytes | Points to an ULONG value receiving the number of bytes written to SecondBuffer | |
| KdContext | Points to a KD_CONTEXT variable storing global packet layer context. If debugger requests stopping the execution, the KD_CONTEXT::BreakInRequested is set to TRUE. |

| VOID __stdcall KdSendPacket | ( | __in ULONG | PacketType, | |
| __in PKD_BUFFER | FirstBuffer, | |||
| __in_opt PKD_BUFFER | SecondBuffer, | |||
| __inout PKD_CONTEXT | KdContext | |||
| ) |
Called by kernel to send a debug packet.
This function is called by Windows kernel to send a debug packet.
| PacketType | Specifies the packet type to send. | |
| FirstBuffer | Specifies the first part of the packet body. | |
| SecondBuffer | Specifies the second part of the packet body. | |
| KdContext | Points to a KD_CONTEXT variable storing global packet layer context. KD_CONTEXT::RetryCount is used by original KDCOM.DLL implementation. |

| ULONG KdVmwareGetActiveCallCount | ( | ) |
| NTSTATUS NegotiateProtocolVersions | ( | ) |

| static bool TestConnectionOnChannel | ( | DefaultRPCChannel & | chn | ) | [static] |

| bool TestConnectionWithHost | ( | ) |

| volatile LONG KdVmwareActiveCallCount = 0 |
KD_BUFFER s_EmptyBuffer [static] |
KD_CONTEXT s_EmptyKdContext [static] |