ReactOS 0.4.15-dev-7897-g78dc504
kdvm.h
Go to the documentation of this file.
1/*
2 * COPYRIGHT: GPL, see COPYING in the top level directory
3 * PROJECT: ReactOS kernel
4 * FILE: drivers/base/kdvm/kdvm.h
5 * PURPOSE: Base definitions for the kernel debugger.
6 * PROGRAMMER: Timo Kreuzer (timo.kreuzer@reactos.org)
7 */
8
9#ifndef _KDDLL_H_
10#define _KDDLL_H_
11
12#define NOEXTAPI
13#include <ntifs.h>
14#include <windbgkd.h>
15#include <arc/arc.h>
16
17#undef RtlEqualMemory
18#define RtlEqualMemory(a, b, c) (RtlCompareMemory(a, b, c) != c)
19
20//#define KDDEBUG /* uncomment to enable debugging this dll */
21
22typedef ULONG (*PFNDBGPRNT)(const char *Format, ...);
24
25#ifndef KDDEBUG
26#define KDDBGPRINT(...)
27#else
28#define KDDBGPRINT KdpDbgPrint
29#endif
30
31#define KDRPC_PROTOCOL_VERSION 0x101
32#define CONNECTION_TEST_ROUNDS 2 /*100*/
33#define KDVM_BUFFER_SIZE (131072 + 1024)
34#define KDRPC_TEST_BUFFER_SIZE 512
35
38extern ULONG KdVmBufferPos;
39
40typedef enum
41{
46
48{
52
53#pragma pack(push,1)
54typedef struct
55{
56 CHAR Magic[8];
59
60typedef struct
61{
63 CHAR Magic[9];
65
66typedef struct _KDVM_CONTEXT
67{
72
73typedef struct
74{
75 struct
76 {
80 };
84
86{
95
97{
102
103typedef struct
104{
111
112typedef struct
113{
124#pragma pack(pop)
125
126VOID
127NTAPI
130 _In_ ULONG Size);
131
132VOID
137
138VOID
139NTAPI
141 VOID);
142
143VOID
144NTAPI
147 _Out_ PULONG ReceiveDataSize);
148
149
150#endif /* _KDDLL_H_ */
unsigned char BOOLEAN
Definition: bufpool.h:45
#define KDVM_BUFFER_SIZE
Definition: kdvm.h:33
VOID NTAPI KdVmDbgDumpBuffer(_In_ PVOID Buffer, _In_ ULONG Size)
Definition: kdvm.c:43
VOID FASTCALL KdVmExchange(_In_ ULONG_PTR PhysicalAddress, _In_ SIZE_T BufferSize)
struct _KDVM_MARSHAL_STRING KDVM_MARSHAL_STRING
struct _KDVM_SEND_PKT_REQUEST KDVM_SEND_PKT_REQUEST
struct _KDVM_CONTEXT KDVM_CONTEXT
VOID NTAPI KdVmKdVmExchangeData(_Out_ PVOID *ReceiveData, _Out_ PULONG ReceiveDataSize)
Definition: kdvbox.c:31
VOID NTAPI KdVmPrepareBuffer(VOID)
Definition: kdvbox.c:24
ULONG KdVmBufferPos
Definition: kdvm.c:20
KDP_STATUS
Definition: kdvm.h:41
@ KDP_PACKET_TIMEOUT
Definition: kdvm.h:43
@ KDP_PACKET_RESEND
Definition: kdvm.h:44
@ KDP_PACKET_RECEIVED
Definition: kdvm.h:42
UCHAR KdVmDataBuffer[KDVM_BUFFER_SIZE]
Definition: kdvm.c:18
PHYSICAL_ADDRESS KdVmBufferPhysicalAddress
Definition: kdvm.c:19
PFNDBGPRNT KdpDbgPrint
Definition: kdvm.c:22
struct _KDVM_CONTEXT * PKDVM_CONTEXT
struct KDVM_RECEIVE_HEADER * PKDVM_RECEIVE_HEADER
struct _KDVM_SEND_PKT_RESULT * PKDVM_SEND_PKT_RESULT
struct KDVM_RECV_PKT_RESULT * PKDVM_RECV_PKT_RESULT
ULONG(* PFNDBGPRNT)(const char *Format,...)
Definition: kdvm.h:22
struct _KDVM_SEND_PKT_REQUEST * PKDVM_SEND_PKT_REQUEST
struct _KDVM_SEND_PKT_RESULT KDVM_SEND_PKT_RESULT
#define _Out_
Definition: ms_sal.h:345
#define _In_
Definition: ms_sal.h:308
#define FASTCALL
Definition: nt_native.h:50
static ULONG ReceiveData(PINFO pInfo)
Definition: ntpclient.c:102
unsigned short USHORT
Definition: pedump.c:61
UCHAR Command
Definition: kdvm.h:57
KDVM_CONTEXT KdContext
Definition: kdvm.h:109
KDVM_SENDPACKET_INFO Info
Definition: kdvm.h:106
KDVM_MARSHAL_STRING MessageHeader
Definition: kdvm.h:107
KDVM_MARSHAL_STRING MessageData
Definition: kdvm.h:108
KDVM_MARSHAL_STRING MessageData
Definition: kdvm.h:116
UCHAR CommandType
Definition: kdvm.h:114
KDP_STATUS KdStatus
Definition: kdvm.h:118
KDVM_CONTEXT KdContext
Definition: kdvm.h:117
KDVM_MARSHAL_STRING MessageHeader
Definition: kdvm.h:115
ULONG HeaderSize
Definition: kdvm.h:120
KDVM_SENDPACKET_INFO Info
Definition: kdvm.h:122
UCHAR RetryKdSendPacket
Definition: kdvm.h:78
UCHAR KdDebuggerEnabledAvailable
Definition: kdvm.h:79
USHORT Unused
Definition: kdvm.h:82
BOOLEAN KdDebuggerEnabled
Definition: kdvm.h:81
UCHAR KdDebuggerNotPresent
Definition: kdvm.h:77
BOOLEAN BreakInRequested
Definition: kdvm.h:69
UCHAR align
Definition: kdvm.h:70
ULONG RetryCount
Definition: kdvm.h:68
USHORT MaximumLength
Definition: kdvm.h:50
USHORT Length
Definition: kdvm.h:49
KDVM_MARSHAL_STRING MessageData
Definition: kdvm.h:88
KDVM_CONTEXT KdContext
Definition: kdvm.h:89
KDVM_SENDPACKET_INFO Info
Definition: kdvm.h:93
KDVM_MARSHAL_STRING MessageHeader
Definition: kdvm.h:87
KDVM_CONTEXT KdContext
Definition: kdvm.h:99
KDVM_SENDPACKET_INFO Info
Definition: kdvm.h:100
UCHAR CommandType
Definition: kdvm.h:98
uint32_t * PULONG
Definition: typedefs.h:59
#define NTAPI
Definition: typedefs.h:36
ULONG_PTR SIZE_T
Definition: typedefs.h:80
uint32_t ULONG_PTR
Definition: typedefs.h:65
uint32_t ULONG
Definition: typedefs.h:59
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
Definition: wdfdevice.h:4533
_In_ WDFMEMORY _Out_opt_ size_t * BufferSize
Definition: wdfmemory.h:254
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS PhysicalAddress
Definition: iotypes.h:1098
unsigned char UCHAR
Definition: xmlstorage.h:181
char CHAR
Definition: xmlstorage.h:175