ReactOS  r75636
kdmain.c File Reference
#include <ntoskrnl.h>
#include <debug.h>
Include dependency graph for kdmain.c:

Go to the source code of this file.

Classes

struct  KD_COMPONENT_DATA
 

Macros

#define NDEBUG
 
#define MAX_KD_COMPONENT_TABLE_ENTRIES   128
 

Functions

VOID NTAPI PspDumpThreads (BOOLEAN SystemThreads)
 
ULONG NTAPI KdpServiceDispatcher (ULONG Service, PVOID Buffer1, ULONG Buffer1Length)
 
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)
 
BOOLEAN NTAPI KdpCallGdb (IN PKTRAP_FRAME TrapFrame, IN PEXCEPTION_RECORD ExceptionRecord, IN PCONTEXT Context)
 
BOOLEAN NTAPI KdIsThisAKdTrap (IN PEXCEPTION_RECORD ExceptionRecord, IN PCONTEXT Context, IN KPROCESSOR_MODE PreviousMode)
 
BOOLEAN NTAPI KdRefreshDebuggerNotPresent (VOID)
 
NTSTATUS NTAPI KdDisableDebugger (VOID)
 
NTSTATUS NTAPI KdEnableDebugger (VOID)
 
BOOLEAN NTAPI KdPollBreakIn (VOID)
 
NTSTATUS NTAPI KdPowerTransition (ULONG PowerState)
 
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)
 
NTSTATUS NTAPI NtQueryDebugFilterState (IN ULONG ComponentId, IN ULONG Level)
 
NTSTATUS NTAPI NtSetDebugFilterState (IN ULONG ComponentId, IN ULONG Level, IN BOOLEAN State)
 
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)
 

Variables

BOOLEAN KdDebuggerEnabled = FALSE
 
BOOLEAN KdEnteredDebugger = FALSE
 
BOOLEAN KdDebuggerNotPresent = TRUE
 
BOOLEAN KdBreakAfterSymbolLoad = FALSE
 
BOOLEAN KdpBreakPending = FALSE
 
BOOLEAN KdPitchDebugger = TRUE
 
BOOLEAN KdIgnoreUmExceptions = FALSE
 
KD_CONTEXT KdpContext
 
ULONG Kd_WIN2000_Mask
 
KD_COMPONENT_DATA KdComponentTable [MAX_KD_COMPONENT_TABLE_ENTRIES]
 
ULONG KdComponentTableEntries = 0
 
ULONG Kd_DEFAULT_MASK = 1 << DPFLTR_ERROR_LEVEL
 
PKDEBUG_ROUTINE KiDebugRoutine = KdpEnterDebuggerException
 

Macro Definition Documentation

#define MAX_KD_COMPONENT_TABLE_ENTRIES   128

Definition at line 32 of file kdmain.c.

Referenced by NtSetDebugFilterState().

#define NDEBUG

Definition at line 11 of file kdmain.c.

Function Documentation

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 at line 358 of file kdmain.c.

364 {
366  return STATUS_NOT_IMPLEMENTED;
367 }
#define STATUS_NOT_IMPLEMENTED
Definition: ntstatus.h:225
#define UNIMPLEMENTED
Definition: debug.h:114
NTSTATUS NTAPI KdDisableDebugger ( VOID  )

Definition at line 287 of file kdmain.c.

Referenced by PcipGetFunctionLimits().

288 {
289  KIRQL OldIrql;
290 
291  /* Raise IRQL */
292  KeRaiseIrql(DISPATCH_LEVEL, &OldIrql);
293 
294  /* TODO: Disable any breakpoints */
295 
296  /* Disable the Debugger */
298  SharedUserData->KdDebuggerEnabled = FALSE;
299 
300  /* Lower the IRQL */
301  KeLowerIrql(OldIrql);
302 
303  /* Return success */
304  return STATUS_SUCCESS;
305 }
#define STATUS_SUCCESS
Definition: contextmenu.cpp:55
#define KeRaiseIrql(irql, oldIrql)
Definition: env_spec_w32.h:597
#define KeLowerIrql(oldIrql)
Definition: env_spec_w32.h:602
UCHAR KIRQL
Definition: env_spec_w32.h:591
#define FALSE
Definition: types.h:117
BOOLEAN KdDebuggerEnabled
Definition: kdmain.c:16
#define SharedUserData
_Requires_lock_held_ Interrupt _Releases_lock_ Interrupt _In_ _IRQL_restores_ KIRQL OldIrql
Definition: kefuncs.h:803
#define DISPATCH_LEVEL
Definition: env_spec_w32.h:696
NTSTATUS NTAPI KdEnableDebugger ( VOID  )

Definition at line 312 of file kdmain.c.

Referenced by KdpStub(), and PcipGetFunctionLimits().

313 {
314  KIRQL OldIrql;
315 
316  /* Raise IRQL */
317  KeRaiseIrql(DISPATCH_LEVEL, &OldIrql);
318 
319  /* TODO: Re-enable any breakpoints */
320 
321  /* Enable the Debugger */
323  SharedUserData->KdDebuggerEnabled = TRUE;
324 
325  /* Lower the IRQL */
326  KeLowerIrql(OldIrql);
327 
328  /* Return success */
329  return STATUS_SUCCESS;
330 }
#define STATUS_SUCCESS
Definition: contextmenu.cpp:55
#define KeRaiseIrql(irql, oldIrql)
Definition: env_spec_w32.h:597
#define TRUE
Definition: types.h:120
#define KeLowerIrql(oldIrql)
Definition: env_spec_w32.h:602
UCHAR KIRQL
Definition: env_spec_w32.h:591
BOOLEAN KdDebuggerEnabled
Definition: kdmain.c:16
#define SharedUserData
_Requires_lock_held_ Interrupt _Releases_lock_ Interrupt _In_ _IRQL_restores_ KIRQL OldIrql
Definition: kefuncs.h:803
#define DISPATCH_LEVEL
Definition: env_spec_w32.h:696
BOOLEAN NTAPI KdIsThisAKdTrap ( IN PEXCEPTION_RECORD  ExceptionRecord,
IN PCONTEXT  Context,
IN KPROCESSOR_MODE  PreviousMode 
)

Definition at line 259 of file kdmain.c.

262 {
263  /* KDBG has its own mechanism for ignoring user mode exceptions */
264  return FALSE;
265 }
#define FALSE
Definition: types.h:117
BOOLEAN NTAPI KdpCallGdb ( IN PKTRAP_FRAME  TrapFrame,
IN PEXCEPTION_RECORD  ExceptionRecord,
IN PCONTEXT  Context 
)

Definition at line 228 of file kdmain.c.

231 {
232  KD_CONTINUE_TYPE Return = kdDoNotHandleException;
233 
234  /* Get out of here if the Debugger isn't connected */
235  if (KdDebuggerNotPresent) return FALSE;
236 
237  /* FIXME:
238  * Right now, the GDB wrapper seems to handle exceptions differntly
239  * from KDGB and both are called at different times, while the GDB
240  * one is only called once and that's it. I don't really have the knowledge
241  * to fix the GDB stub, so until then, we'll be using this hack
242  */
243  if (WrapperInitRoutine)
244  {
245  Return = WrapperTable.KdpExceptionRoutine(ExceptionRecord,
246  Context,
247  TrapFrame);
248  }
249 
250  /* Debugger didn't handle it, please handle! */
251  if (Return == kdHandleException) return FALSE;
252 
253  /* Debugger handled it */
254  return TRUE;
255 }
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
PKDP_INIT_ROUTINE WrapperInitRoutine
Definition: kdinit.c:27
KD_DISPATCH_TABLE WrapperTable
Definition: kdinit.c:28
BOOLEAN KdDebuggerNotPresent
Definition: kdmain.c:18
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 at line 123 of file kdmain.c.

129 {
130  KD_CONTINUE_TYPE Return = kdHandleException;
131  ULONG ExceptionCommand = ExceptionRecord->ExceptionInformation[0];
132 
133  /* Check if this was a breakpoint due to DbgPrint or Load/UnloadSymbols */
134  if ((ExceptionRecord->ExceptionCode == STATUS_BREAKPOINT) &&
135  (ExceptionRecord->NumberParameters > 0) &&
136  ((ExceptionCommand == BREAKPOINT_LOAD_SYMBOLS) ||
137  (ExceptionCommand == BREAKPOINT_UNLOAD_SYMBOLS) ||
138  (ExceptionCommand == BREAKPOINT_COMMAND_STRING) ||
139  (ExceptionCommand == BREAKPOINT_PRINT) ||
140  (ExceptionCommand == BREAKPOINT_PROMPT)))
141  {
142  /* Check if this is a debug print */
143  if (ExceptionCommand == BREAKPOINT_PRINT)
144  {
145  /* Print the string */
147  (PVOID)ExceptionRecord->ExceptionInformation[1],
148  ExceptionRecord->ExceptionInformation[2]);
149 
150  /* Return success */
152  }
153 #ifdef KDBG
154  else if (ExceptionCommand == BREAKPOINT_LOAD_SYMBOLS)
155  {
156  PLDR_DATA_TABLE_ENTRY LdrEntry;
157 
158  /* Load symbols. Currently implemented only for KDBG! */
159  if(KdbpSymFindModule(((PKD_SYMBOLS_INFO)ExceptionRecord->ExceptionInformation[2])->BaseOfDll, NULL, -1, &LdrEntry))
160  KdbSymProcessSymbols(LdrEntry);
161  }
162  else if (ExceptionCommand == BREAKPOINT_PROMPT)
163  {
165  LPSTR OutString;
166  USHORT OutStringLength;
167 
168  /* Get the response string and length */
169  OutString = (LPSTR)Context->Ebx;
170  OutStringLength = (USHORT)Context->Edi;
171 
172  /* Call KDBG */
173  ReturnValue = KdpPrompt((LPSTR)ExceptionRecord->
174  ExceptionInformation[1],
175  (USHORT)ExceptionRecord->
176  ExceptionInformation[2],
177  OutString,
178  OutStringLength);
179 
180  /* Return the number of characters that we received */
181  Context->Eax = ReturnValue;
182  }
183 #endif
184 
185  /* This we can handle: simply bump the Program Counter */
187  return TRUE;
188  }
189 
190 #ifdef KDBG
191  /* Check if this is an assertion failure */
192  if (ExceptionRecord->ExceptionCode == STATUS_ASSERTION_FAILURE)
193  {
194  /* Bump EIP to the instruction following the int 2C */
195  Context->Eip += 2;
196  }
197 #endif
198 
199  /* Get out of here if the Debugger isn't connected */
200  if (KdDebuggerNotPresent) return FALSE;
201 
202 #ifdef KDBG
203  /* Call KDBG if available */
204  Return = KdbEnterDebuggerException(ExceptionRecord,
205  PreviousMode,
206  Context,
207  TrapFrame,
208  !SecondChance);
209 #else /* not KDBG */
210  if (WrapperInitRoutine)
211  {
212  /* Call GDB */
213  Return = WrapperTable.KdpExceptionRoutine(ExceptionRecord,
214  Context,
215  TrapFrame);
216  }
217 #endif /* not KDBG */
218 
219  /* Debugger didn't handle it, please handle! */
220  if (Return == kdHandleException) return FALSE;
221 
222  /* Debugger handled it */
223  return TRUE;
224 }
DWORD *typedef PVOID
Definition: winlogon.h:52
#define STATUS_SUCCESS
Definition: contextmenu.cpp:55
#define TRUE
Definition: types.h:120
#define KeSetContextReturnRegister(Context, ReturnValue)
Definition: ke.h:115
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)
char * LPSTR
Definition: xmlstorage.h:182
UINT32 void void ** ReturnValue
Definition: acevents.h:192
#define FALSE
Definition: types.h:117
#define BREAKPOINT_UNLOAD_SYMBOLS
Definition: kdtypes.h:54
smooth NULL
Definition: ftsmooth.c:513
#define STATUS_BREAKPOINT
Definition: ntstatus.h:172
#define KeGetContextPc(Context)
Definition: ke.h:100
#define BREAKPOINT_PROMPT
Definition: kdtypes.h:52
#define STATUS_ASSERTION_FAILURE
Definition: ntstatus.h:946
_In_ KPROCESSOR_MODE PreviousMode
Definition: sefuncs.h:103
#define BREAKPOINT_PRINT
Definition: kdtypes.h:51
VOID KdbSymProcessSymbols(IN PLDR_DATA_TABLE_ENTRY LdrEntry)
Definition: kdb_symbols.c:424
Definition: ntddk_ex.h:202
PKDP_INIT_ROUTINE WrapperInitRoutine
Definition: kdinit.c:27
unsigned short USHORT
Definition: pedump.c:61
#define BREAKPOINT_LOAD_SYMBOLS
Definition: kdtypes.h:53
KD_DISPATCH_TABLE WrapperTable
Definition: kdinit.c:28
unsigned int ULONG
Definition: retypes.h:1
#define BREAKPOINT_COMMAND_STRING
Definition: kdtypes.h:55
ULONG NTAPI KdpServiceDispatcher(ULONG Service, PVOID Buffer1, ULONG Buffer1Length)
Definition: kdmain.c:42
#define KD_BREAKPOINT_SIZE
Definition: ke.h:94
KD_CONTINUE_TYPE KdbEnterDebuggerException(IN PEXCEPTION_RECORD ExceptionRecord OPTIONAL, IN KPROCESSOR_MODE PreviousMode, IN PCONTEXT Context, IN OUT PKTRAP_FRAME TrapFrame, IN BOOLEAN FirstChance)
KDB Exception filter.
Definition: kdb.c:1352
#define KeSetContextPc(Context, ProgramCounter)
Definition: ke.h:103
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
BOOLEAN NTAPI KdPollBreakIn ( VOID  )

Definition at line 337 of file kdmain.c.

Referenced by KdInitSystem(), KeUpdateSystemTime(), KiInitializeSystem(), KiSystemStartup(), and KiSystemStartupReal().

338 {
339  return KdpBreakPending;
340 }
BOOLEAN KdpBreakPending
Definition: kdmain.c:20
NTSTATUS NTAPI KdPowerTransition ( ULONG  PowerState)

Definition at line 347 of file kdmain.c.

348 {
350  return STATUS_NOT_IMPLEMENTED;
351 }
#define STATUS_NOT_IMPLEMENTED
Definition: ntstatus.h:225
#define UNIMPLEMENTED
Definition: debug.h:114
ULONG NTAPI KdpServiceDispatcher ( ULONG  Service,
PVOID  Buffer1,
ULONG  Buffer1Length 
)

Definition at line 42 of file kdmain.c.

Referenced by KdpEnterDebuggerException(), and KdSystemDebugControl().

45 {
46  ULONG Result = 0;
47 
48  switch (Service)
49  {
50  case BREAKPOINT_PRINT: /* DbgPrint */
51  Result = KdpPrintString(Buffer1, Buffer1Length);
52  break;
53 
54 #if DBG
55  case ' soR': /* ROS-INTERNAL */
56  {
57  switch ((ULONG_PTR)Buffer1)
58  {
59  case DumpAllThreads:
61  break;
62 
63  case DumpUserThreads:
65  break;
66 
67  case KdSpare3:
69  break;
70 
71  default:
72  break;
73  }
74  break;
75  }
76 
77 #if defined(_M_IX86) && !defined(_WINKD_) // See ke/i386/traphdlr.c
78  /* Register a debug callback */
79  case 'CsoR':
80  {
81  switch (Buffer1Length)
82  {
83  case ID_Win32PreServiceHook:
84  KeWin32PreServiceHook = Buffer1;
85  break;
86 
87  case ID_Win32PostServiceHook:
88  KeWin32PostServiceHook = Buffer1;
89  break;
90 
91  }
92  break;
93  }
94 #endif
95 
96  /* Special case for stack frame dumps */
97  case 'DsoR':
98  {
99  KeRosDumpStackFrames((PULONG)Buffer1, Buffer1Length);
100  break;
101  }
102 
103 #if defined(KDBG)
104  /* Register KDBG CLI callback */
105  case 'RbdK':
106  {
107  Result = KdbRegisterCliCallback(Buffer1, Buffer1Length);
108  break;
109  }
110 #endif /* KDBG */
111 #endif /* DBG */
112  default:
113  DPRINT1("Invalid debug service call!\n");
114  HalDisplayString("Invalid debug service call!\r\n");
115  break;
116  }
117 
118  return Result;
119 }
#define KeRosDumpStackFrames(Frames, Count)
Definition: gdidebug.h:11
#define TRUE
Definition: types.h:120
VOID NTAPI MmDumpArmPfnDatabase(IN BOOLEAN StatusOnly)
Definition: mminit.c:1464
ULONG NTAPI KdpPrintString(LPSTR String, ULONG Length)
Definition: kdio.c:579
VOID NTAPI PspDumpThreads(BOOLEAN SystemThreads)
_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
uint32_t ULONG_PTR
Definition: typedefs.h:64
#define FALSE
Definition: types.h:117
BOOLEAN NTAPI KdbRegisterCliCallback(PVOID Callback, BOOLEAN Deregister)
Definition: kdb_cli.c:3307
#define BREAKPOINT_PRINT
Definition: kdtypes.h:51
unsigned int * PULONG
Definition: retypes.h:1
NTHALAPI VOID NTAPI HalDisplayString(PUCHAR String)
#define DPRINT1
Definition: precomp.h:8
unsigned int ULONG
Definition: retypes.h:1
BOOLEAN NTAPI KdRefreshDebuggerNotPresent ( VOID  )

Definition at line 274 of file kdmain.c.

275 {
277 
278  /* Just return whatever was set previously -- FIXME! */
279  return KdDebuggerNotPresent;
280 }
#define UNIMPLEMENTED
Definition: debug.h:114
BOOLEAN KdDebuggerNotPresent
Definition: kdmain.c:18
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 at line 459 of file kdmain.c.

Referenced by DriverEntry(), i8042KbdInterruptService(), KdRosDumpStackFrames(), KdRosSetDebugCallback(), and NtSystemDebugControl().

466 {
467  /* HACK */
469 }
Definition: shell.h:41
CHAR InputBuffer[80]
Definition: conmgr.c:33
_Must_inspect_result_ _In_ PFILE_OBJECT _In_ ULONG _In_ ULONG InputBufferLength
Definition: fltkernel.h:1372
ULONG NTAPI KdpServiceDispatcher(ULONG Service, PVOID Buffer1, ULONG Buffer1Length)
Definition: kdmain.c:42
NTSTATUS NTAPI NtQueryDebugFilterState ( IN ULONG  ComponentId,
IN ULONG  Level 
)

Definition at line 372 of file kdmain.c.

Referenced by DbgQueryDebugFilterState(), and vDbgPrintExWithPrefixInternal().

374 {
375  ULONG i;
376 
377  /* Convert Level to mask if it isn't already one */
378  if (Level < 32)
379  Level = 1 << Level;
380 
381  /* Check if it is not the default component */
382  if (ComponentId != MAXULONG)
383  {
384  /* No, search for an existing entry in the table */
385  for (i = 0; i < KdComponentTableEntries; i++)
386  {
387  /* Check if it is the right component */
389  {
390  /* Check if mask are matching */
391  return (Level & KdComponentTable[i].Level) ? TRUE : FALSE;
392  }
393  }
394  }
395 
396  /* Entry not found in the table, use default mask */
397  return (Level & Kd_DEFAULT_MASK) ? TRUE : FALSE;
398 }
KD_COMPONENT_DATA KdComponentTable[MAX_KD_COMPONENT_TABLE_ENTRIES]
Definition: kdmain.c:33
#define TRUE
Definition: types.h:120
_IRQL_requires_same_ typedef _In_ ULONG _In_ UCHAR Level
Definition: wmitypes.h:55
GLenum GLclampf GLint i
Definition: glfuncs.h:14
#define FALSE
Definition: types.h:117
#define MAXULONG
Definition: typedefs.h:251
ULONG Kd_DEFAULT_MASK
Definition: kdmain.c:36
ULONG KdComponentTableEntries
Definition: kdmain.c:34
unsigned int ULONG
Definition: retypes.h:1
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 const char UINT32 const char const char UINT32 ComponentId
Definition: acpixf.h:1256
NTSTATUS NTAPI NtSetDebugFilterState ( IN ULONG  ComponentId,
IN ULONG  Level,
IN BOOLEAN  State 
)

Definition at line 402 of file kdmain.c.

Referenced by DbgSetDebugFilterState(), and KdbpCmdFilter().

405 {
406  ULONG i;
407 
408  /* Convert Level to mask if it isn't already one */
409  if (Level < 32)
410  Level = 1 << Level;
411  Level &= ~DPFLTR_MASK;
412 
413  /* Check if it is the default component */
414  if (ComponentId == MAXULONG)
415  {
416  /* Yes, modify the default mask */
417  if (State)
419  else
421 
422  return STATUS_SUCCESS;
423  }
424 
425  /* Search for an existing entry */
426  for (i = 0; i < KdComponentTableEntries; i++ )
427  {
429  break;
430  }
431 
432  /* Check if we have found an existing entry */
433  if (i == KdComponentTableEntries)
434  {
435  /* Check if we have enough space in the table */
438 
439  /* Add a new entry */
443  }
444 
445  /* Update entry table */
446  if (State)
448  else
450 
451  return STATUS_SUCCESS;
452 }
#define STATUS_SUCCESS
Definition: contextmenu.cpp:55
KD_COMPONENT_DATA KdComponentTable[MAX_KD_COMPONENT_TABLE_ENTRIES]
Definition: kdmain.c:33
#define DPFLTR_MASK
Definition: kdtypes.h:34
_IRQL_requires_same_ typedef _In_ ULONG _In_ UCHAR Level
Definition: wmitypes.h:55
GLenum GLclampf GLint i
Definition: glfuncs.h:14
#define MAX_KD_COMPONENT_TABLE_ENTRIES
Definition: kdmain.c:32
#define STATUS_INVALID_PARAMETER_1
Definition: ntstatus.h:461
#define MAXULONG
Definition: typedefs.h:251
ULONG Kd_DEFAULT_MASK
Definition: kdmain.c:36
ULONG KdComponentTableEntries
Definition: kdmain.c:34
ULONG ComponentId
Definition: kdmain.c:29
unsigned int ULONG
Definition: retypes.h:1
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 const char UINT32 const char const char UINT32 ComponentId
Definition: acpixf.h:1256
VOID NTAPI PspDumpThreads ( BOOLEAN  SystemThreads)

Referenced by KdpServiceDispatcher().

Variable Documentation

ULONG Kd_DEFAULT_MASK = 1 << DPFLTR_ERROR_LEVEL

Definition at line 36 of file kdmain.c.

Referenced by NtQueryDebugFilterState(), and NtSetDebugFilterState().

ULONG Kd_WIN2000_Mask

Definition at line 24 of file kdmain.c.

BOOLEAN KdBreakAfterSymbolLoad = FALSE

Definition at line 19 of file kdmain.c.

Definition at line 33 of file kdmain.c.

ULONG KdComponentTableEntries = 0

Definition at line 34 of file kdmain.c.

Referenced by NtQueryDebugFilterState(), and NtSetDebugFilterState().

BOOLEAN KdEnteredDebugger = FALSE

Definition at line 17 of file kdmain.c.

BOOLEAN KdIgnoreUmExceptions = FALSE

Definition at line 22 of file kdmain.c.

BOOLEAN KdpBreakPending = FALSE

Definition at line 20 of file kdmain.c.

Referenced by KdPollBreakIn().

KD_CONTEXT KdpContext

Definition at line 23 of file kdmain.c.

BOOLEAN KdPitchDebugger = TRUE

Definition at line 21 of file kdmain.c.

Definition at line 471 of file kdmain.c.