856ed50970cc9616699e5bd188d0c6359840bc6b
[reactos.git] / reactos / ntoskrnl / include / internal / kd.h
1 typedef
2 BOOLEAN
3 (NTAPI *PKDEBUG_ROUTINE)(
4 IN PKTRAP_FRAME TrapFrame,
5 IN PKEXCEPTION_FRAME ExceptionFrame,
6 IN PEXCEPTION_RECORD ExceptionRecord,
7 IN PCONTEXT Context,
8 IN KPROCESSOR_MODE PreviousMode,
9 IN BOOLEAN SecondChance
10 );
11
12 typedef
13 BOOLEAN
14 (NTAPI *PKDEBUG_SWITCH_ROUTINE)(
15 IN PEXCEPTION_RECORD ExceptionRecord,
16 IN PCONTEXT Context,
17 IN BOOLEAN SecondChance
18 );
19
20 BOOLEAN
21 NTAPI
22 KdpEnterDebuggerException(
23 IN PKTRAP_FRAME TrapFrame,
24 IN PKEXCEPTION_FRAME ExceptionFrame,
25 IN PEXCEPTION_RECORD ExceptionRecord,
26 IN PCONTEXT Context,
27 IN KPROCESSOR_MODE PreviousMode,
28 IN BOOLEAN SecondChance
29 );
30
31 VOID
32 NTAPI
33 KdpTimeSlipWork(
34 IN PVOID Context
35 );
36
37 BOOLEAN
38 NTAPI
39 KdpSwitchProcessor(
40 IN PEXCEPTION_RECORD ExceptionRecord,
41 IN OUT PCONTEXT ContextRecord,
42 IN BOOLEAN SecondChanceException
43 );
44
45 VOID
46 NTAPI
47 KdpTimeSlipDpcRoutine(
48 IN PKDPC Dpc,
49 IN PVOID DeferredContext,
50 IN PVOID SystemArgument1,
51 IN PVOID SystemArgument2
52 );
53
54 BOOLEAN
55 NTAPI
56 KdpStub(
57 IN PKTRAP_FRAME TrapFrame,
58 IN PKEXCEPTION_FRAME ExceptionFrame,
59 IN PEXCEPTION_RECORD ExceptionRecord,
60 IN PCONTEXT ContextRecord,
61 IN KPROCESSOR_MODE PreviousMode,
62 IN BOOLEAN SecondChanceException
63 );
64
65 BOOLEAN
66 NTAPI
67 KdpTrap(
68 IN PKTRAP_FRAME TrapFrame,
69 IN PKEXCEPTION_FRAME ExceptionFrame,
70 IN PEXCEPTION_RECORD ExceptionRecord,
71 IN PCONTEXT ContextRecord,
72 IN KPROCESSOR_MODE PreviousMode,
73 IN BOOLEAN SecondChanceException
74 );
75
76 VOID
77 NTAPI
78 KdpPortLock(
79 VOID
80 );
81
82 VOID
83 NTAPI
84 KdpPortUnlock(
85 VOID
86 );
87
88 BOOLEAN
89 NTAPI
90 KdEnterDebugger(
91 IN PKTRAP_FRAME TrapFrame,
92 IN PKEXCEPTION_FRAME ExceptionFrame
93 );
94
95 VOID
96 NTAPI
97 KdExitDebugger(
98 IN BOOLEAN Entered
99 );
100
101 NTSTATUS
102 NTAPI
103 KdEnableDebuggerWithLock(
104 IN BOOLEAN NeedLock
105 );
106
107 ULONG
108 NTAPI
109 KdpPrint(
110 IN ULONG ComponentId,
111 IN ULONG ComponentMask,
112 IN LPSTR String,
113 IN ULONG Length,
114 IN KPROCESSOR_MODE PreviousMode,
115 IN PKTRAP_FRAME TrapFrame,
116 IN PKEXCEPTION_FRAME ExceptionFrame,
117 OUT PBOOLEAN Status
118 );
119
120 ULONG
121 NTAPI
122 KdpSymbol(
123 IN PSTRING DllPath,
124 IN PKD_SYMBOLS_INFO DllBase,
125 IN BOOLEAN Unload,
126 IN KPROCESSOR_MODE PreviousMode,
127 IN PCONTEXT ContextRecord,
128 IN PKTRAP_FRAME TrapFrame,
129 IN PKEXCEPTION_FRAME ExceptionFrame
130 );
131
132 BOOLEAN
133 NTAPI
134 KdpPollBreakInWithPortLock(
135 VOID
136 );
137
138 BOOLEAN
139 NTAPI
140 KdpReportLoadSymbolsStateChange(
141 IN PSTRING PathName,
142 IN PKD_SYMBOLS_INFO SymbolInfo,
143 IN BOOLEAN Unload,
144 IN OUT PCONTEXT Context
145 );
146
147 extern DBGKD_GET_VERSION64 KdVersionBlock;
148 extern KDDEBUGGER_DATA64 KdDebuggerDataBlock;
149 extern LIST_ENTRY KdpDebuggerDataListHead;
150 extern KSPIN_LOCK KdpDataSpinLock;
151 extern LARGE_INTEGER KdPerformanceCounterRate;
152 extern LARGE_INTEGER KdTimerStart;
153 extern ULONG KdDisableCount;
154 extern KD_CONTEXT KdpContext;
155 extern PKDEBUG_ROUTINE KiDebugRoutine;
156 extern PKDEBUG_SWITCH_ROUTINE KiDebugSwitchRoutine;
157 extern BOOLEAN KdBreakAfterSymbolLoad;
158 extern BOOLEAN KdPitchDebugger;
159 extern BOOLEAN _KdDebuggerNotPresent;
160 extern BOOLEAN _KdDebuggerEnabled;
161 extern BOOLEAN KdAutoEnableOnEvent;
162 extern BOOLEAN KdPreviouslyEnabled;
163 extern BOOLEAN KdpDebuggerStructuresInitialized;
164 extern BOOLEAN KdEnteredDebugger;
165 extern KDPC KdpTimeSlipDpc;
166 extern KTIMER KdpTimeSlipTimer;
167 extern WORK_QUEUE_ITEM KdpTimeSlipWorkItem;
168 extern LONG KdpTimeSlipPending;
169 extern PKEVENT KdpTimeSlipEvent;
170 extern KSPIN_LOCK KdpTimeSlipEventLock;
171 extern BOOLEAN KdpControlCPressed;
172 extern BOOLEAN KdpControlCWaiting;
173 extern BOOLEAN KdpPortLocked;
174 extern KSPIN_LOCK KdpDebuggerLock;
175 extern LARGE_INTEGER KdTimerStop, KdTimerStart, KdTimerDifference;
176 extern ULONG KdComponentTableSize;
177 extern ULONG Kd_WIN2000_Mask;
178 extern PULONG KdComponentTable[104];
179 extern CHAR KdpMessageBuffer[4096], KdpPathBuffer[4096];