Synchronize up to trunk's revision r57784.
[reactos.git] / drivers / base / kddll / kddll.h
1 /*
2 * COPYRIGHT: GPL, see COPYING in the top level directory
3 * PROJECT: ReactOS kernel
4 * FILE: drivers/base/kddll/kddll.h
5 * PURPOSE: Base definitions for the kernel debugger.
6 * PROGRAMMER: Timo Kreuzer (timo.kreuzer@ewactos.org)
7 */
8
9 #pragma once
10
11 //#define KDDEBUG /* uncomment to enable debugging this dll */
12
13 #define NOEXTAPI
14 #include <ntifs.h>
15 #include <halfuncs.h>
16 #include "arc/arc.h"
17 #include "windbgkd.h"
18
19 #include <wdbgexts.h>
20 #include <ioaccess.h> /* port intrinsics */
21
22 #define NDEBUG
23 #include <debug.h>
24
25 long atol(const char *str);
26
27 typedef UCHAR BYTE, *PBYTE;
28
29 typedef ULONG (*PFNDBGPRNT)(const char *Format, ...);
30 extern PFNDBGPRNT KdpDbgPrint;
31 extern BOOLEAN KdpPhase1Complete;
32 extern ULONG KdpStallScaleFactor;
33
34 typedef enum
35 {
36 KDP_PACKET_RECEIVED = 0,
37 KDP_PACKET_TIMEOUT = 1,
38 KDP_PACKET_RESEND = 2
39 } KDP_STATUS;
40
41 #ifndef KDDEBUG
42 #define KDDBGPRINT(...)
43 #else
44 #define KDDBGPRINT KdpDbgPrint
45 #endif
46
47 VOID
48 NTAPI
49 KdpSendBuffer(
50 IN PVOID Buffer,
51 IN ULONG Size);
52
53 KDP_STATUS
54 NTAPI
55 KdpReceiveBuffer(
56 OUT PVOID Buffer,
57 IN ULONG Size);
58
59 KDP_STATUS
60 NTAPI
61 KdpReceivePacketLeader(
62 OUT PULONG PacketLeader);
63
64 VOID
65 NTAPI
66 KdpSendByte(IN BYTE Byte);
67
68 KDP_STATUS
69 NTAPI
70 KdpPollByte(OUT PBYTE OutByte);
71
72 KDP_STATUS
73 NTAPI
74 KdpReceiveByte(OUT PBYTE OutByte);
75
76 KDP_STATUS
77 NTAPI
78 KdpPollBreakIn(VOID);
79
80
81 #if 0
82 NTSTATUS
83 NTAPI
84 KdDebuggerInitialize0(
85 IN PLOADER_PARAMETER_BLOCK LoaderBlock OPTIONAL);
86 #endif