145{
146 BOOLEAN EnableKd, DisableKdAfterInit =
FALSE, BlockEnable;
147 PSTR CommandLine, DebugLine, DebugOptionStart, DebugOptionEnd;
154 CHAR NameBuffer[256];
156
157#if defined(__GNUC__)
158
160#endif
161
162
163 if (BootPhase)
164 {
165
168 }
169
170
172
173
175
176
178
179
181 {
182
184
185
189
190
193
194#ifdef CONFIG_SMP
195
197#endif
198
199
202
203
209
210
212 }
213
214
215 if (LoaderBlock)
216 {
217
220 InLoadOrderLinks);
221
222
225
226
227 CommandLine = LoaderBlock->LoadOptions;
229 {
230
232
233
235
236
237 if (
strstr(CommandLine,
"CRASHDEBUG"))
238 {
239
241 }
242 else if (
strstr(CommandLine,
"NODEBUG"))
243 {
244
246 }
247 else if ((DebugLine =
strstr(CommandLine,
"DEBUG")) !=
NULL)
248 {
249
251
252
253 if (DebugLine[5] == '=')
254 {
255
256 DebugOptionStart = DebugOptionEnd = &DebugLine[6];
257
258
259 for (;;)
260 {
261
263 {
264
265 if ((*DebugOptionEnd == ',') ||
266 (*DebugOptionEnd == ' ') ||
267 (*DebugOptionEnd == '\t'))
268 {
269
270
271
272
273 break;
274 }
275 else
276 {
277
278 DebugOptionEnd++;
279 }
280 }
281
282
283 DebugOptionLength = (DebugOptionEnd - DebugOptionStart);
284
285
286
287
288
289 if (!DebugOptionLength) break;
290
291
292 if ((DebugOptionLength == 10) &&
293 !(
strncmp(DebugOptionStart,
"AUTOENABLE", 10)))
294 {
295
296
297
298
299 DisableKdAfterInit =
TRUE;
302 }
303 else if ((DebugOptionLength == 7) &&
304 !(
strncmp(DebugOptionStart,
"DISABLE", 7)))
305 {
306
307 DisableKdAfterInit =
TRUE;
310 }
311 else if ((DebugOptionLength == 6) &&
312 !(
strncmp(DebugOptionStart,
"NOUMEX", 6)))
313 {
314
316 }
317
318
319
320
321
322 if (*DebugOptionEnd != ',')
323 {
324
325 break;
326 }
327
328
329 DebugOptionEnd++;
330 DebugOptionStart = DebugOptionEnd;
331 }
332 }
333 }
334 }
335 else
336 {
337
340 }
341 }
342 else
343 {
344
346
347
349 }
350
351
353
354
356 {
357
359
360
362 {
363
365
366
369 {
373 }
374
375
379
380
382 }
383
384
386
387
390
391
393
394
396 KdpPrintBanner(MemSizeMBs);
397
398
399 if (DisableKdAfterInit)
400 {
401
403
404
405
406
407
410 }
411
412
413 if (LoaderBlock)
414 {
415
416 NextEntry = LoaderBlock->LoadOrderListHead.
Flink;
418 while ((NextEntry != &LoaderBlock->LoadOrderListHead) && (
i < 2))
419 {
420
423 InLoadOrderLinks);
424
425
429 do
430 {
431
434
435
437
438
443
444
445 NextEntry = NextEntry->
Flink;
447 }
448 }
449
450
452 }
453 else
454 {
455
457 }
458
459
461}
char * strstr(char *String1, char *String2)
int strncmp(const char *String1, const char *String2, ACPI_SIZE Count)
#define NT_SUCCESS(StatCode)
VOID NTAPI KeInitializeDpc(IN PKDPC Dpc, IN PKDEFERRED_ROUTINE DeferredRoutine, IN PVOID DeferredContext)
#define InitializeListHead(ListHead)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
LARGE_INTEGER NTAPI KeQueryPerformanceCounter(IN PLARGE_INTEGER PerformanceFreq)
BOOLEAN NTAPI KdpTrap(IN PKTRAP_FRAME TrapFrame, IN PKEXCEPTION_FRAME ExceptionFrame, IN PEXCEPTION_RECORD ExceptionRecord, IN PCONTEXT ContextRecord, IN KPROCESSOR_MODE PreviousMode, IN BOOLEAN SecondChanceException)
#define KD_BREAKPOINT_MAX
BREAKPOINT_ENTRY KdpBreakpointTable[KD_BREAKPOINT_MAX]
NTSTATUS NTAPI KdDisableDebuggerWithLock(IN BOOLEAN NeedLock)
LARGE_INTEGER KdPerformanceCounterRate
BOOLEAN KdBreakAfterSymbolLoad
DBGKD_GET_VERSION64 KdVersionBlock
VOID NTAPI KdpTimeSlipWork(IN PVOID Context)
LARGE_INTEGER KdTimerStart
BOOLEAN KdIgnoreUmExceptions
PKDEBUG_ROUTINE KiDebugRoutine
BOOLEAN NTAPI KdpStub(IN PKTRAP_FRAME TrapFrame, IN PKEXCEPTION_FRAME ExceptionFrame, IN PEXCEPTION_RECORD ExceptionRecord, IN PCONTEXT ContextRecord, IN KPROCESSOR_MODE PreviousMode, IN BOOLEAN SecondChanceException)
WORK_QUEUE_ITEM KdpTimeSlipWorkItem
LIST_ENTRY KdpDebuggerDataListHead
BOOLEAN KdpDebuggerStructuresInitialized
VOID NTAPI KdpTimeSlipDpcRoutine(IN PKDPC Dpc, IN PVOID DeferredContext, IN PVOID SystemArgument1, IN PVOID SystemArgument2)
BOOLEAN KdAutoEnableOnEvent
NTSTATUS NTAPI KdDebuggerInitialize0(IN PLOADER_PARAMETER_BLOCK LoaderBlock OPTIONAL)
BOOLEAN KdDebuggerNotPresent
BOOLEAN KdDebuggerEnabled
KDDEBUGGER_DATA64 * KdDebuggerDataBlock
BOOLEAN NTAPI KdRegisterDebuggerDataBlock(IN ULONG Tag, IN PDBGKD_DEBUG_DATA_HEADER64 DataHeader, IN ULONG Size)
BOOLEAN NTAPI KdPollBreakIn(VOID)
PLOADER_PARAMETER_BLOCK KeLoaderBlock
static const char * ImageName
VOID NTAPI DbgLoadImageSymbols(_In_ PSTRING Name, _In_ PVOID Base, _In_ ULONG_PTR ProcessId)
NTSYSAPI VOID NTAPI RtlInitString(PSTRING DestinationString, PCSZ SourceString)
_In_ ULONG _In_ ULONG _In_ ULONG Length
HANDLE NTAPI PsGetCurrentProcessId(VOID)
LIST_ENTRY PsLoadedModuleList
ULONG_PTR PsNtosImageBase
_CRTIMP char *__cdecl _strupr(_Inout_z_ char *_String)
#define DBGKD_VERS_FLAG_MP
ULONG_PTR DirectoryTableBase
ULONG64 PsLoadedModuleList
DBGKD_DEBUG_DATA_HEADER64 Header
UNICODE_STRING FullDllName
VOID NTAPI KeInitializeTimer(OUT PKTIMER Timer)
#define DbgKdMaximumStateChange
#define DbgKdMinimumStateChange
#define DbgKdMaximumManipulate
#define DbgKdMinimumManipulate
#define ExInitializeWorkItem(Item, Routine, Context)