1 /******************************************************************************
2 * Kernel Debugger Functions *
3 ******************************************************************************/
11 IN ULONG MaximumResponseLength
);
23 #if (NTDDI_VERSION >= NTDDI_WIN2K)
27 DbgPrintReturnControlC(
32 #if (NTDDI_VERSION >= NTDDI_WINXP)
43 #ifdef _VA_LIST_DEFINED
57 vDbgPrintExWithPrefix(
64 #endif /* _VA_LIST_DEFINED */
69 DbgQueryDebugFilterState(
76 DbgSetDebugFilterState(
81 #endif /* (NTDDI_VERSION >= NTDDI_WINXP) */
83 #if (NTDDI_VERSION >= NTDDI_VISTA)
86 (*PDEBUG_PRINT_CALLBACK
)(
94 DbgSetDebugPrintCallback(
95 IN PDEBUG_PRINT_CALLBACK DebugPrintCallback
,
98 #endif /* (NTDDI_VERSION >= NTDDI_VISTA) */
104 #define KdPrint(_x_) DbgPrint _x_
105 #define KdPrintEx(_x_) DbgPrintEx _x_
106 #define vKdPrintEx(_x_) vDbgPrintEx _x_
107 #define vKdPrintExWithPrefix(_x_) vDbgPrintExWithPrefix _x_
108 #define KdBreakPoint() DbgBreakPoint()
109 #define KdBreakPointWithStatus(s) DbgBreakPointWithStatus(s)
114 #define KdPrintEx(_x_)
115 #define vKdPrintEx(_x_)
116 #define vKdPrintExWithPrefix(_x_)
117 #define KdBreakPoint()
118 #define KdBreakPointWithStatus(s)
122 #if defined(__GNUC__)
124 extern NTKERNELAPI BOOLEAN KdDebuggerNotPresent
;
125 extern NTKERNELAPI BOOLEAN KdDebuggerEnabled
;
126 #define KD_DEBUGGER_ENABLED KdDebuggerEnabled
127 #define KD_DEBUGGER_NOT_PRESENT KdDebuggerNotPresent
129 #elif defined(_NTDDK_) || defined(_NTIFS_) || defined(_NTHAL_) || defined(_WDMDDK_) || defined(_NTOSP_)
131 extern NTKERNELAPI PBOOLEAN KdDebuggerNotPresent
;
132 extern NTKERNELAPI PBOOLEAN KdDebuggerEnabled
;
133 #define KD_DEBUGGER_ENABLED *KdDebuggerEnabled
134 #define KD_DEBUGGER_NOT_PRESENT *KdDebuggerNotPresent
138 extern BOOLEAN KdDebuggerNotPresent
;
139 extern BOOLEAN KdDebuggerEnabled
;
140 #define KD_DEBUGGER_ENABLED KdDebuggerEnabled
141 #define KD_DEBUGGER_NOT_PRESENT KdDebuggerNotPresent
145 #if (NTDDI_VERSION >= NTDDI_WIN2K)
150 KdDisableDebugger(VOID
);
155 KdEnableDebugger(VOID
);
157 #if (_MSC_FULL_VER >= 150030729) && !defined(IMPORT_NATIVE_DBG_BREAK)
158 #define DbgBreakPoint __debugbreak
168 DbgBreakPointWithStatus(
171 #endif /* (NTDDI_VERSION >= NTDDI_WIN2K) */
173 #if (NTDDI_VERSION >= NTDDI_WS03)
177 KdRefreshDebuggerNotPresent(VOID
);
180 #if (NTDDI_VERSION >= NTDDI_WS03SP1)
186 IN ULONG InBufferBytes OPTIONAL
,
188 IN ULONG OutBufferBytes OPTIONAL
,
190 OUT PULONG OutBufferNeeded OPTIONAL
);