1 /******************************************************************************
2 * Kernel Debugger Functions *
3 ******************************************************************************/
15 #define KdPrint(_x_) DbgPrint _x_
16 #define KdPrintEx(_x_) DbgPrintEx _x_
17 #define vKdPrintExWithPrefix(_x_) vDbgPrintExWithPrefix _x_
18 #define KdBreakPoint() DbgBreakPoint()
19 #define KdBreakPointWithStatus(s) DbgBreakPointWithStatus(s)
24 #define KdPrintEx(_x_)
25 #define vKdPrintExWithPrefix(_x_)
26 #define KdBreakPoint()
27 #define KdBreakPointWithStatus(s)
33 extern NTKERNELAPI BOOLEAN KdDebuggerNotPresent
;
34 extern NTKERNELAPI BOOLEAN KdDebuggerEnabled
;
35 #define KD_DEBUGGER_ENABLED KdDebuggerEnabled
36 #define KD_DEBUGGER_NOT_PRESENT KdDebuggerNotPresent
38 #elif defined(_NTDDK_) || defined(_NTIFS_) || defined(_NTHAL_) || defined(_WDMDDK_) || defined(_NTOSP_)
40 extern NTKERNELAPI PBOOLEAN KdDebuggerNotPresent
;
41 extern NTKERNELAPI PBOOLEAN KdDebuggerEnabled
;
42 #define KD_DEBUGGER_ENABLED *KdDebuggerEnabled
43 #define KD_DEBUGGER_NOT_PRESENT *KdDebuggerNotPresent
47 extern BOOLEAN KdDebuggerNotPresent
;
48 extern BOOLEAN KdDebuggerEnabled
;
49 #define KD_DEBUGGER_ENABLED KdDebuggerEnabled
50 #define KD_DEBUGGER_NOT_PRESENT KdDebuggerNotPresent
54 #ifdef _VA_LIST_DEFINED
55 #if (NTDDI_VERSION >= NTDDI_WINXP)
69 vDbgPrintExWithPrefix(
77 #endif /* _VA_LIST_DEFINED */
79 #if (NTDDI_VERSION >= NTDDI_WIN2K)
84 KdDisableDebugger(VOID
);
89 KdEnableDebugger(VOID
);
91 #if (_MSC_FULL_VER >= 150030729) && !defined(IMPORT_NATIVE_DBG_BREAK)
92 #define DbgBreakPoint __debugbreak
102 DbgBreakPointWithStatus(
108 DbgPrintReturnControlC(
112 #endif /* (NTDDI_VERSION >= NTDDI_WIN2K) */
114 #if (NTDDI_VERSION >= NTDDI_WINXP)
120 IN ULONG ComponentId
,
128 DbgQueryDebugFilterState(
129 IN ULONG ComponentId
,
135 DbgSetDebugFilterState(
136 IN ULONG ComponentId
,
142 #if (NTDDI_VERSION >= NTDDI_WS03)
146 KdRefreshDebuggerNotPresent(VOID
);
149 #if (NTDDI_VERSION >= NTDDI_WS03SP1)
155 IN ULONG InBufferBytes OPTIONAL
,
157 IN ULONG OutBufferBytes OPTIONAL
,
159 OUT PULONG OutBufferNeeded OPTIONAL
);