ReactOS  0.4.13-dev-479-gec9c8fd
kdmain.c
Go to the documentation of this file.
1 /*
2  * COPYRIGHT: See COPYING in the top level directory
3  * PROJECT: ReactOS Kernel
4  * FILE: ntoskrnl/kd/kdmain.c
5  * PURPOSE: Kernel Debugger Initialization
6  *
7  * PROGRAMMERS: Alex Ionescu (alex@relsoft.net)
8  */
9 
10 #include <ntoskrnl.h>
11 #define NDEBUG
12 #include <debug.h>
13 
14 /* VARIABLES ***************************************************************/
15 
26 VOID NTAPI PspDumpThreads(BOOLEAN SystemThreads);
27 
28 typedef struct
29 {
33 #define MAX_KD_COMPONENT_TABLE_ENTRIES 128
36 
38 
39 /* PRIVATE FUNCTIONS *********************************************************/
40 
41 ULONG
42 NTAPI
44  PVOID Buffer1,
45  ULONG Buffer1Length,
47 {
48  ULONG Result = 0;
49 
50  switch (Service)
51  {
52  case BREAKPOINT_PRINT: /* DbgPrint */
53  Result = KdpPrintString(Buffer1, Buffer1Length, PreviousMode);
54  break;
55 
56 #if DBG
57  case ' soR': /* ROS-INTERNAL */
58  {
59  switch ((ULONG_PTR)Buffer1)
60  {
61  case DumpAllThreads:
63  break;
64 
65  case DumpUserThreads:
67  break;
68 
69  case KdSpare3:
71  break;
72 
73  default:
74  break;
75  }
76  break;
77  }
78 
79 #if defined(_M_IX86) && !defined(_WINKD_) // See ke/i386/traphdlr.c
80  /* Register a debug callback */
81  case 'CsoR':
82  {
83  switch (Buffer1Length)
84  {
85  case ID_Win32PreServiceHook:
86  KeWin32PreServiceHook = Buffer1;
87  break;
88 
89  case ID_Win32PostServiceHook:
90  KeWin32PostServiceHook = Buffer1;
91  break;
92 
93  }
94  break;
95  }
96 #endif
97 
98  /* Special case for stack frame dumps */
99  case 'DsoR':
100  {
101  KeRosDumpStackFrames((PULONG)Buffer1, Buffer1Length);
102  break;
103  }
104 
105 #if defined(KDBG)
106  /* Register KDBG CLI callback */
107  case 'RbdK':
108  {
109  Result = KdbRegisterCliCallback(Buffer1, Buffer1Length);
110  break;
111  }
112 #endif /* KDBG */
113 #endif /* DBG */
114  default:
115  DPRINT1("Invalid debug service call!\n");
116  HalDisplayString("Invalid debug service call!\r\n");
117  break;
118  }
119 
120  return Result;
121 }
122 
123 BOOLEAN
124 NTAPI
126  IN PKEXCEPTION_FRAME ExceptionFrame,
127  IN PEXCEPTION_RECORD ExceptionRecord,
130  IN BOOLEAN SecondChance)
131 {
132  KD_CONTINUE_TYPE Return = kdHandleException;
133  ULONG ExceptionCommand = ExceptionRecord->ExceptionInformation[0];
134 
135  /* Check if this was a breakpoint due to DbgPrint or Load/UnloadSymbols */
136  if ((ExceptionRecord->ExceptionCode == STATUS_BREAKPOINT) &&
137  (ExceptionRecord->NumberParameters > 0) &&
138  ((ExceptionCommand == BREAKPOINT_LOAD_SYMBOLS) ||
139  (ExceptionCommand == BREAKPOINT_UNLOAD_SYMBOLS) ||
140  (ExceptionCommand == BREAKPOINT_COMMAND_STRING) ||
141  (ExceptionCommand == BREAKPOINT_PRINT) ||
142  (ExceptionCommand == BREAKPOINT_PROMPT)))
143  {
144  /* Check if this is a debug print */
145  if (ExceptionCommand == BREAKPOINT_PRINT)
146  {
147  /* Print the string */
149  (PVOID)ExceptionRecord->ExceptionInformation[1],
150  ExceptionRecord->ExceptionInformation[2],
151  PreviousMode);
152 
153  /* Return success */
155  }
156 #ifdef KDBG
157  else if (ExceptionCommand == BREAKPOINT_LOAD_SYMBOLS)
158  {
159  PKD_SYMBOLS_INFO SymbolsInfo;
160  KD_SYMBOLS_INFO CapturedSymbolsInfo;
161  PLDR_DATA_TABLE_ENTRY LdrEntry;
162 
163  SymbolsInfo = (PKD_SYMBOLS_INFO)ExceptionRecord->ExceptionInformation[2];
165  {
166  _SEH2_TRY
167  {
168  ProbeForRead(SymbolsInfo,
169  sizeof(*SymbolsInfo),
170  1);
171  RtlCopyMemory(&CapturedSymbolsInfo,
172  SymbolsInfo,
173  sizeof(*SymbolsInfo));
174  SymbolsInfo = &CapturedSymbolsInfo;
175  }
177  {
178  SymbolsInfo = NULL;
179  }
180  _SEH2_END;
181  }
182 
183  if (SymbolsInfo != NULL)
184  {
185  /* Load symbols. Currently implemented only for KDBG! */
186  if (KdbpSymFindModule(SymbolsInfo->BaseOfDll, NULL, -1, &LdrEntry))
187  {
188  KdbSymProcessSymbols(LdrEntry);
189  }
190  }
191  }
192  else if (ExceptionCommand == BREAKPOINT_PROMPT)
193  {
195  LPSTR OutString;
196  USHORT OutStringLength;
197 
198  /* Get the response string and length */
199  OutString = (LPSTR)Context->Ebx;
200  OutStringLength = (USHORT)Context->Edi;
201 
202  /* Call KDBG */
203  ReturnValue = KdpPrompt((LPSTR)ExceptionRecord->
204  ExceptionInformation[1],
205  (USHORT)ExceptionRecord->
206  ExceptionInformation[2],
207  OutString,
208  OutStringLength,
209  PreviousMode,
210  TrapFrame,
211  ExceptionFrame);
212 
213  /* Return the number of characters that we received */
214  Context->Eax = ReturnValue;
215  }
216 #endif
217 
218  /* This we can handle: simply bump the Program Counter */
220  return TRUE;
221  }
222 
223 #ifdef KDBG
224  /* Check if this is an assertion failure */
225  if (ExceptionRecord->ExceptionCode == STATUS_ASSERTION_FAILURE)
226  {
227  /* Bump EIP to the instruction following the int 2C */
228  Context->Eip += 2;
229  }
230 #endif
231 
232  /* Get out of here if the Debugger isn't connected */
233  if (KdDebuggerNotPresent) return FALSE;
234 
235 #ifdef KDBG
236  /* Call KDBG if available */
237  Return = KdbEnterDebuggerException(ExceptionRecord,
238  PreviousMode,
239  Context,
240  TrapFrame,
241  !SecondChance);
242 #else /* not KDBG */
243  if (WrapperInitRoutine)
244  {
245  /* Call GDB */
246  Return = WrapperTable.KdpExceptionRoutine(ExceptionRecord,
247  Context,
248  TrapFrame);
249  }
250 #endif /* not KDBG */
251 
252  /* Debugger didn't handle it, please handle! */
253  if (Return == kdHandleException) return FALSE;
254 
255  /* Debugger handled it */
256  return TRUE;
257 }
258 
259 BOOLEAN
260 NTAPI
264 {
265  /* KDBG has its own mechanism for ignoring user mode exceptions */
266  return FALSE;
267 }
268 
269 /* PUBLIC FUNCTIONS *********************************************************/
270 
271 VOID
272 NTAPI
274 {
275 }
276 
277 /*
278  * @implemented
279  */
280 BOOLEAN
281 NTAPI
283 {
285 
286  /* Just return whatever was set previously -- FIXME! */
287  return KdDebuggerNotPresent;
288 }
289 
290 /*
291  * @implemented
292  */
293 NTSTATUS
294 NTAPI
296 {
297  KIRQL OldIrql;
298 
299  /* Raise IRQL */
301 
302  /* TODO: Disable any breakpoints */
303 
304  /* Disable the Debugger */
306  SharedUserData->KdDebuggerEnabled = FALSE;
307 
308  /* Lower the IRQL */
310 
311  /* Return success */
312  return STATUS_SUCCESS;
313 }
314 
315 NTSTATUS
316 NTAPI
318 {
319  return STATUS_ACCESS_DENIED;
320 }
321 
322 /*
323  * @implemented
324  */
325 NTSTATUS
326 NTAPI
328 {
329  KIRQL OldIrql;
330 
331  /* Raise IRQL */
333 
334  /* TODO: Re-enable any breakpoints */
335 
336  /* Enable the Debugger */
338  SharedUserData->KdDebuggerEnabled = TRUE;
339 
340  /* Lower the IRQL */
342 
343  /* Return success */
344  return STATUS_SUCCESS;
345 }
346 
347 /*
348  * @implemented
349  */
350 BOOLEAN
351 NTAPI
353 {
354  return FALSE;
355 }
356 
357 /*
358  * @unimplemented
359  */
360 NTSTATUS
361 NTAPI
363 {
365  return STATUS_NOT_IMPLEMENTED;
366 }
367 
368 /*
369  * @unimplemented
370  */
371 NTSTATUS
372 NTAPI
374  IN ULONG InBufferLength OPTIONAL,
375  IN PVOID InBuffer,
376  IN ULONG OutBufferLength OPTIONAL,
377  OUT PVOID OutBuffer,
378  OUT PULONG OutBufferRequiredLength OPTIONAL)
379 {
381  return STATUS_NOT_IMPLEMENTED;
382 }
383 
384 
385 NTSTATUS
386 NTAPI
388  IN ULONG Level)
389 {
390  ULONG i;
391 
392  /* Convert Level to mask if it isn't already one */
393  if (Level < 32)
394  Level = 1 << Level;
395 
396  /* Check if it is not the default component */
397  if (ComponentId != MAXULONG)
398  {
399  /* No, search for an existing entry in the table */
400  for (i = 0; i < KdComponentTableEntries; i++)
401  {
402  /* Check if it is the right component */
404  {
405  /* Check if mask are matching */
406  return (Level & KdpComponentTable[i].Level) ? TRUE : FALSE;
407  }
408  }
409  }
410 
411  /* Entry not found in the table, use default mask */
412  return (Level & Kd_DEFAULT_MASK) ? TRUE : FALSE;
413 }
414 
415 NTSTATUS
416 NTAPI
418  IN ULONG Level,
419  IN BOOLEAN State)
420 {
421  ULONG i;
422 
423  /* Convert Level to mask if it isn't already one */
424  if (Level < 32)
425  Level = 1 << Level;
426  Level &= ~DPFLTR_MASK;
427 
428  /* Check if it is the default component */
429  if (ComponentId == MAXULONG)
430  {
431  /* Yes, modify the default mask */
432  if (State)
434  else
436 
437  return STATUS_SUCCESS;
438  }
439 
440  /* Search for an existing entry */
441  for (i = 0; i < KdComponentTableEntries; i++ )
442  {
444  break;
445  }
446 
447  /* Check if we have found an existing entry */
448  if (i == KdComponentTableEntries)
449  {
450  /* Check if we have enough space in the table */
453 
454  /* Add a new entry */
458  }
459 
460  /* Update entry table */
461  if (State)
463  else
465 
466  return STATUS_SUCCESS;
467 }
468 
469 /*
470  * @unimplemented
471  */
472 NTSTATUS
473 NTAPI
481 {
482  /* HACK */
484  InputBuffer,
486  PreviousMode);
487 }
488 
490 
491  /* EOF */
BOOLEAN KdEnteredDebugger
Definition: kdmain.c:17
ULONG Kd_WIN2000_Mask
Definition: kdmain.c:23
IN CINT OUT PVOID IN ULONG OUT PULONG ReturnLength
Definition: dumpinfo.c:39
#define KeRosDumpStackFrames(Frames, Count)
Definition: gdidebug.h:11
#define IN
Definition: typedefs.h:38
#define KeRaiseIrql(irql, oldIrql)
Definition: env_spec_w32.h:597
#define TRUE
Definition: types.h:120
NTSYSAPI VOID NTAPI RtlCopyMemory(VOID UNALIGNED *Destination, CONST VOID UNALIGNED *Source, ULONG Length)
_In_ UCHAR _In_ POWER_STATE PowerState
Definition: pofuncs.h:42
#define KeLowerIrql(oldIrql)
Definition: env_spec_w32.h:602
#define STATUS_NOT_IMPLEMENTED
Definition: ntstatus.h:225
NTSTATUS NTAPI KdDisableDebugger(VOID)
Definition: kdmain.c:295
struct _KD_SYMBOLS_INFO * PKD_SYMBOLS_INFO
VOID NTAPI MmDumpArmPfnDatabase(IN BOOLEAN StatusOnly)
Definition: mminit.c:1474
#define KeSetContextReturnRegister(Context, ReturnValue)
Definition: ke.h:139
LONG NTSTATUS
Definition: precomp.h:26
ULONG NTAPI KdpServiceDispatcher(ULONG Service, PVOID Buffer1, ULONG Buffer1Length, KPROCESSOR_MODE PreviousMode)
Definition: kdmain.c:43
USHORT NTAPI KdpPrompt(IN LPSTR PromptString, IN USHORT PromptLength, OUT LPSTR ResponseString, IN USHORT MaximumResponseLength, IN KPROCESSOR_MODE PreviousMode, IN PKTRAP_FRAME TrapFrame, IN PKEXCEPTION_FRAME ExceptionFrame)
VOID NTAPI KdUpdateDataBlock(VOID)
Definition: kdmain.c:273
#define DPFLTR_MASK
Definition: kdtypes.h:34
_Must_inspect_result_ _In_ PFILE_OBJECT _In_ ULONG _In_ ULONG _In_ ULONG OutputBufferLength
Definition: fltkernel.h:1374
VOID NTAPI PspDumpThreads(BOOLEAN SystemThreads)
NTSTATUS NTAPI KdEnableDebuggerWithLock(IN BOOLEAN NeedLock)
Definition: kdmain.c:317
_IRQL_requires_same_ typedef _In_ ULONG _In_ UCHAR Level
Definition: wmitypes.h:55
ACPI_BUFFER *RetBuffer ACPI_BUFFER *RetBuffer char ACPI_WALK_RESOURCE_CALLBACK void *Context ACPI_BUFFER *RetBuffer UINT16 ACPI_RESOURCE **ResourcePtr ACPI_GENERIC_ADDRESS *Reg UINT32 *ReturnValue UINT8 UINT8 *Slp_TypB ACPI_PHYSICAL_ADDRESS PhysicalAddress64 UINT32 UINT32 *TimeElapsed UINT32 ACPI_STATUS const char UINT32 ACPI_STATUS const char UINT32 const char const char UINT32 ComponentId
Definition: acpixf.h:1252
Definition: shell.h:41
KD_COMPONENT_DATA KdpComponentTable[MAX_KD_COMPONENT_TABLE_ENTRIES]
Definition: kdmain.c:34
char * LPSTR
Definition: xmlstorage.h:182
CHAR InputBuffer[80]
Definition: conmgr.c:33
NTSTATUS NTAPI KdPowerTransition(ULONG PowerState)
Definition: kdmain.c:362
_SEH2_TRY
Definition: create.c:4250
uint32_t ULONG_PTR
Definition: typedefs.h:63
UCHAR KIRQL
Definition: env_spec_w32.h:591
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
Definition: glfuncs.h:248
BOOLEAN NTAPI KdIsThisAKdTrap(IN PEXCEPTION_RECORD ExceptionRecord, IN PCONTEXT Context, IN KPROCESSOR_MODE PreviousMode)
Definition: kdmain.c:261
UINT32 void void ** ReturnValue
Definition: acevents.h:213
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
#define MAX_KD_COMPONENT_TABLE_ENTRIES
Definition: kdmain.c:33
long LONG
Definition: pedump.c:60
#define BREAKPOINT_UNLOAD_SYMBOLS
Definition: kdtypes.h:54
BOOLEAN KdPitchDebugger
Definition: kdmain.c:20
BOOLEAN NTAPI KdPollBreakIn(VOID)
Definition: kdmain.c:352
BOOLEAN NTAPI KdbRegisterCliCallback(PVOID Callback, BOOLEAN Deregister)
Definition: kdb_cli.c:3319
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
unsigned char BOOLEAN
enum _SYSDBG_COMMAND SYSDBG_COMMAND
smooth NULL
Definition: ftsmooth.c:416
#define STATUS_BREAKPOINT
Definition: ntstatus.h:172
BOOLEAN KdDebuggerEnabled
Definition: kdmain.c:16
PVOID BaseOfDll
Definition: kdtypes.h:170
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO
Definition: wsk.h:426
_Must_inspect_result_ __drv_aliasesMem _In_ PDEVICE_OBJECT _In_opt_ PVOID _In_ ULONG _Out_opt_ PVOID OutputBuffer
Definition: iofuncs.h:713
#define KeGetContextPc(Context)
Definition: ke.h:124
NTSTATUS NTAPI KdChangeOption(IN KD_OPTION Option, IN ULONG InBufferLength OPTIONAL, IN PVOID InBuffer, IN ULONG OutBufferLength OPTIONAL, OUT PVOID OutBuffer, OUT PULONG OutBufferRequiredLength OPTIONAL)
Definition: kdmain.c:373
LONG KdpTimeSlipPending
Definition: kdmain.c:24
BOOLEAN NTAPI KdRefreshDebuggerNotPresent(VOID)
Definition: kdmain.c:282
#define BREAKPOINT_PROMPT
Definition: kdtypes.h:52
NTSTATUS NTAPI KdSystemDebugControl(IN SYSDBG_COMMAND Command, IN PVOID InputBuffer, IN ULONG InputBufferLength, OUT PVOID OutputBuffer, IN ULONG OutputBufferLength, IN OUT PULONG ReturnLength, IN KPROCESSOR_MODE PreviousMode)
Definition: kdmain.c:474
#define STATUS_ASSERTION_FAILURE
Definition: ntstatus.h:946
_In_ KPROCESSOR_MODE PreviousMode
Definition: sefuncs.h:103
BOOLEAN NTAPI KdpEnterDebuggerException(IN PKTRAP_FRAME TrapFrame, IN PKEXCEPTION_FRAME ExceptionFrame, IN PEXCEPTION_RECORD ExceptionRecord, IN PCONTEXT Context, IN KPROCESSOR_MODE PreviousMode, IN BOOLEAN SecondChance)
Definition: kdmain.c:125
KDDEBUGGER_DATA64 KdDebuggerDataBlock
Definition: kdmain.c:25
if(!(yy_init))
Definition: macro.lex.yy.c:714
#define STATUS_ACCESS_DENIED
Definition: udferr_usr.h:145
CCHAR KPROCESSOR_MODE
Definition: ketypes.h:7
NTSTATUS NTAPI KdEnableDebugger(VOID)
Definition: kdmain.c:327
#define SharedUserData
#define BREAKPOINT_PRINT
Definition: kdtypes.h:51
KD_CONTINUE_TYPE KdbEnterDebuggerException(IN PEXCEPTION_RECORD ExceptionRecord OPTIONAL, IN KPROCESSOR_MODE PreviousMode, IN PCONTEXT Context, IN OUT PKTRAP_FRAME InitialTrapFrame, IN BOOLEAN FirstChance)
KDB Exception filter.
Definition: kdb.c:1377
VOID NTAPI ProbeForRead(IN CONST VOID *Address, IN SIZE_T Length, IN ULONG Alignment)
Definition: exintrin.c:102
_Requires_lock_held_ Interrupt _Releases_lock_ Interrupt _In_ _IRQL_restores_ KIRQL OldIrql
Definition: kefuncs.h:803
#define STATUS_INVALID_PARAMETER_1
Definition: ntstatus.h:461
VOID KdbSymProcessSymbols(IN PLDR_DATA_TABLE_ENTRY LdrEntry)
Definition: kdb_symbols.c:424
Definition: btrfs_drv.h:1831
NTSTATUS NTAPI NtQueryDebugFilterState(IN ULONG ComponentId, IN ULONG Level)
Definition: kdmain.c:387
_Must_inspect_result_ _In_ PFILE_OBJECT _In_ ULONG _In_ ULONG InputBufferLength
Definition: fltkernel.h:1372
#define MAXULONG
Definition: typedefs.h:250
#define DISPATCH_LEVEL
Definition: env_spec_w32.h:696
PKDP_INIT_ROUTINE WrapperInitRoutine
Definition: kdinit.c:27
_SEH2_END
Definition: create.c:4424
ULONG Kd_DEFAULT_MASK
Definition: kdmain.c:37
#define DPFLTR_ERROR_LEVEL
Definition: main.cpp:32
unsigned short USHORT
Definition: pedump.c:61
ULONG KdComponentTableEntries
Definition: kdmain.c:35
#define BREAKPOINT_LOAD_SYMBOLS
Definition: kdtypes.h:53
unsigned int * PULONG
Definition: retypes.h:1
ULONG ComponentId
Definition: kdmain.c:30
NTHALAPI VOID NTAPI HalDisplayString(PUCHAR String)
#define DPRINT1
Definition: precomp.h:8
BOOLEAN(NTAPI * PKDEBUG_ROUTINE)(IN PKTRAP_FRAME TrapFrame, IN PKEXCEPTION_FRAME ExceptionFrame, IN PEXCEPTION_RECORD ExceptionRecord, IN PCONTEXT Context, IN KPROCESSOR_MODE PreviousMode, IN BOOLEAN SecondChance)
Definition: kd64.h:61
#define OUT
Definition: typedefs.h:39
KD_DISPATCH_TABLE WrapperTable
Definition: kdinit.c:28
unsigned int ULONG
Definition: retypes.h:1
#define UNIMPLEMENTED
Definition: debug.h:114
#define BREAKPOINT_COMMAND_STRING
Definition: kdtypes.h:55
PKDEBUG_ROUTINE KiDebugRoutine
Definition: kdmain.c:489
enum _KD_OPTION KD_OPTION
BOOLEAN KdIgnoreUmExceptions
Definition: kdmain.c:21
#define _SEH2_EXCEPT(...)
Definition: pseh2_64.h:6
#define KD_BREAKPOINT_SIZE
Definition: ke.h:118
ULONG NTAPI KdpPrintString(_In_reads_bytes_(Length) PCHAR UnsafeString, _In_ ULONG Length, _In_ KPROCESSOR_MODE PreviousMode)
Definition: kdio.c:573
#define KeSetContextPc(Context, ProgramCounter)
Definition: ke.h:127
return STATUS_SUCCESS
Definition: btrfs.c:2777
BOOLEAN KdBreakAfterSymbolLoad
Definition: kdmain.c:19
NTSTATUS NTAPI NtSetDebugFilterState(IN ULONG ComponentId, IN ULONG Level, IN BOOLEAN State)
Definition: kdmain.c:417
KD_CONTEXT KdpContext
Definition: kdmain.c:22
BOOLEAN KdDebuggerNotPresent
Definition: kdmain.c:18
BOOLEAN KdbpSymFindModule(IN PVOID Address OPTIONAL, IN LPCWSTR Name OPTIONAL, IN INT Index OPTIONAL, OUT PLDR_DATA_TABLE_ENTRY *pLdrEntry)
Find a module...
Definition: kdb_symbols.c:76
PULONG MinorVersion OPTIONAL
Definition: CrossNt.h:68