kdvmware/kdvmware.cpp File Reference

Contains guest side of KdXXX() marshalling functions. More...

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

Include dependency graph for kdvmware.cpp:


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

Detailed Description

Contains guest side of KdXXX() marshalling functions.

Author:
Ivan Shcherbakov (Bazis)
Id
kdvmware.cpp,v 1.8 2009/01/04 14:20:33 Bazis Exp

Define Documentation

#define CONNECTION_TEST_ROUNDS   100


Typedef Documentation

typedef BufferedRPCChannel<g_PacketBuffer, sizeof(g_PacketBuffer)> DefaultRPCChannel


Function Documentation

void __stdcall DllEntryPoint (  ) 

Here is the call graph for this function:

void HalInitSystem ( void *  ,
void *   
)

NTSTATUS __stdcall KdDebuggerInitialize0 ( PVOID  lpLoaderParameterBlock  ) 

Performs initial KD extension DLL initialization.

Here is the call graph for this function:

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.

Parameters:
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.

Here is the call graph for this function:

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.

Parameters:
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.
Remarks:
Note that the packet itself contains no information about sizes of FirstBuffer and SecondBuffer, its body just contains both buffer contens placed one after another.

Here is the call graph for this function:

ULONG KdVmwareGetActiveCallCount (  ) 

NTSTATUS NegotiateProtocolVersions (  ) 

Here is the call graph for this function:

static bool TestConnectionOnChannel ( DefaultRPCChannel chn  )  [static]

Here is the call graph for this function:

bool TestConnectionWithHost (  ) 

Here is the call graph for this function:


Variable Documentation

volatile LONG KdVmwareActiveCallCount = 0

SourceForge.net Logo