1 /******************************************************************************
2 * Kernel Debugger Functions *
3 ******************************************************************************/
10 _Out_writes_bytes_(MaximumResponseLength
) PCH Response
,
11 _In_ ULONG MaximumResponseLength
);
20 _In_z_ _Printf_format_string_ PCSTR Format
,
23 #if (NTDDI_VERSION >= NTDDI_WIN2K)
27 DbgPrintReturnControlC(
28 _In_z_ _Printf_format_string_ PCCH Format
,
32 #if (NTDDI_VERSION >= NTDDI_WINXP)
38 _In_ ULONG ComponentId
,
40 _In_z_ _Printf_format_string_ PCSTR Format
,
43 #ifdef _VA_LIST_DEFINED
49 _In_ ULONG ComponentId
,
57 vDbgPrintExWithPrefix(
59 _In_ ULONG ComponentId
,
64 #endif /* _VA_LIST_DEFINED */
69 DbgQueryDebugFilterState(
70 _In_ ULONG ComponentId
,
76 DbgSetDebugFilterState(
77 _In_ ULONG ComponentId
,
81 #endif /* (NTDDI_VERSION >= NTDDI_WINXP) */
83 #if (NTDDI_VERSION >= NTDDI_VISTA)
86 (*PDEBUG_PRINT_CALLBACK
)(
88 _In_ ULONG ComponentId
,
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)
123 extern BOOLEAN KdDebuggerEnabled
;
124 #define KD_DEBUGGER_ENABLED KdDebuggerEnabled
125 extern BOOLEAN KdDebuggerNotPresent
;
126 #define KD_DEBUGGER_NOT_PRESENT KdDebuggerNotPresent
128 __CREATE_NTOS_DATA_IMPORT_ALIAS(KdDebuggerEnabled
)
129 extern BOOLEAN
*KdDebuggerEnabled
;
130 #define KD_DEBUGGER_ENABLED (*KdDebuggerEnabled)
131 __CREATE_NTOS_DATA_IMPORT_ALIAS(KdDebuggerNotPresent
)
132 extern BOOLEAN
*KdDebuggerNotPresent
;
133 #define KD_DEBUGGER_NOT_PRESENT (*KdDebuggerNotPresent)
136 #if (NTDDI_VERSION >= NTDDI_WIN2K)
141 KdDisableDebugger(VOID
);
146 KdEnableDebugger(VOID
);
148 #if (_MSC_FULL_VER >= 150030729) && !defined(IMPORT_NATIVE_DBG_BREAK)
149 #define DbgBreakPoint __debugbreak
161 DbgBreakPointWithStatus(
164 #endif /* (NTDDI_VERSION >= NTDDI_WIN2K) */
166 #if (NTDDI_VERSION >= NTDDI_WS03)
170 KdRefreshDebuggerNotPresent(VOID
);
173 #if (NTDDI_VERSION >= NTDDI_WS03SP1)
178 _In_ KD_OPTION Option
,
179 _In_opt_ ULONG InBufferBytes
,
181 _In_opt_ ULONG OutBufferBytes
,
182 _Out_ PVOID OutBuffer
,
183 _Out_opt_ PULONG OutBufferNeeded
);