Go to the source code of this file.
Classes | |
struct | _KD_BUFFER |
Represents a buffer used by KdSendPacket()/KdReceivePacket(). More... | |
struct | _KD_CONTEXT |
Represents the global state of the KD packet layer. More... | |
struct | _KD_PACKET_HEADER |
Represents a KDCOM packet header in the way it is sent via COM port. More... | |
struct | SendableKdBuffer |
Contains the KD_BUFFER fields except for buffer pointer. Used for marshalling. More... | |
Typedefs | |
typedef enum _KD_RECV_CODE | KD_RECV_CODE |
Values returned by KdReceivePacket. | |
typedef enum _KD_RECV_CODE * | PKD_RECV_CODE |
typedef struct _KD_BUFFER | KD_BUFFER |
Represents a buffer used by KdSendPacket()/KdReceivePacket(). | |
typedef struct _KD_BUFFER * | PKD_BUFFER |
typedef struct _KD_CONTEXT | KD_CONTEXT |
Represents the global state of the KD packet layer. | |
typedef struct _KD_CONTEXT * | PKD_CONTEXT |
typedef struct _KD_PACKET_HEADER | KD_PACKET_HEADER |
Represents a KDCOM packet header in the way it is sent via COM port. | |
typedef struct _KD_PACKET_HEADER * | PKD_PACKET_HEADER |
typedef LONG | NTSTATUS |
Enumerations | |
enum | _KD_RECV_CODE { KD_RECV_CODE_OK = 0, KD_RECV_CODE_TIMEOUT = 1, KD_RECV_CODE_FAILED = 2 } |
Values returned by KdReceivePacket. More... | |
enum | { KdPacketType3 = 3, KdPacketAcknowledge = 4, KdPacketRetryRequest = 5, KdPacketResynchronize = 6, KdPacketType7 = 7, KdCheckForAnyPacket = 8, KdPacketType11 = 11 } |
Possible packet types used by KdSendPacket()/KdReceivePacket(). More... | |
Functions | |
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. | |
NTSTATUS __stdcall | KdDebuggerInitialize0 (PVOID lpLoaderParameterBlock) |
Performs initial KD extension DLL initialization. |
Definition in file kdxxx.h.
typedef struct _KD_BUFFER KD_BUFFER |
Represents a buffer used by KdSendPacket()/KdReceivePacket().
typedef struct _KD_CONTEXT KD_CONTEXT |
Represents the global state of the KD packet layer.
typedef struct _KD_PACKET_HEADER KD_PACKET_HEADER |
Represents a KDCOM packet header in the way it is sent via COM port.
This structure was extracted from KDCOM.DLL
typedef enum _KD_RECV_CODE KD_RECV_CODE |
Values returned by KdReceivePacket.
typedef struct _KD_BUFFER * PKD_BUFFER |
typedef struct _KD_CONTEXT * PKD_CONTEXT |
typedef struct _KD_PACKET_HEADER * PKD_PACKET_HEADER |
typedef enum _KD_RECV_CODE * PKD_RECV_CODE |
anonymous enum |
Possible packet types used by KdSendPacket()/KdReceivePacket().
KdPacketType3 | |
KdPacketAcknowledge | Sent when a data packet was successfully received. |
KdPacketRetryRequest | Sent when a corrupted data packet is received (or it cannot be processed now). |
KdPacketResynchronize | Sent by WinDBG to resynchronize target and by target to acknowledge resync. |
KdPacketType7 | |
KdCheckForAnyPacket | Not a packet type. When specified to KdReceivePacket(), it checks whether any data is available on COM port. |
KdPacketType11 |
enum _KD_RECV_CODE |
NTSTATUS __stdcall KdDebuggerInitialize0 | ( | PVOID | lpLoaderParameterBlock | ) |
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. |
Definition at line 358 of file kdvm.cpp.
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. |
Definition at line 347 of file kdvm.cpp.