ReactOS  0.4.14-dev-50-g13bb5e2
kdfuncs.h
Go to the documentation of this file.
1 /******************************************************************************
2  * Kernel Debugger Functions *
3  ******************************************************************************/
4 $if (_NTDDK_)
6 ULONG
7 NTAPI
9  _In_z_ PCCH Prompt,
13 
14 $if (_WDMDDK_)
15 #ifndef _DBGNT_
16 
17 ULONG
18 __cdecl
19 DbgPrint(
21  ...);
22 
23 #if (NTDDI_VERSION >= NTDDI_WIN2K)
25 ULONG
26 __cdecl
29  ...);
30 #endif
31 
32 #if (NTDDI_VERSION >= NTDDI_WINXP)
33 
35 ULONG
36 __cdecl
41  ...);
42 
43 #ifdef _VA_LIST_DEFINED
44 
46 ULONG
47 NTAPI
52  _In_ va_list ap);
53 
55 ULONG
56 NTAPI
62  _In_ va_list ap);
63 
64 #endif /* _VA_LIST_DEFINED */
65 
68 NTAPI
71  _In_ ULONG Level);
72 
75 NTAPI
80 
81 #endif /* (NTDDI_VERSION >= NTDDI_WINXP) */
82 
83 #if (NTDDI_VERSION >= NTDDI_VISTA)
84 
85 typedef VOID
89  _In_ ULONG Level);
90 
93 NTAPI
95  _In_ PDEBUG_PRINT_CALLBACK DebugPrintCallback,
97 
98 #endif /* (NTDDI_VERSION >= NTDDI_VISTA) */
99 
100 #endif /* _DBGNT_ */
101 
102 #if DBG
103 
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)
110 
111 #else /* !DBG */
112 
113 #define KdPrint(_x_)
114 #define KdPrintEx(_x_)
115 #define vKdPrintEx(_x_)
116 #define vKdPrintExWithPrefix(_x_)
117 #define KdBreakPoint()
118 #define KdBreakPointWithStatus(s)
119 
120 #endif /* !DBG */
121 
122 #ifdef _NTSYSTEM_
124 #define KD_DEBUGGER_ENABLED KdDebuggerEnabled
126 #define KD_DEBUGGER_NOT_PRESENT KdDebuggerNotPresent
127 #else
129 extern BOOLEAN *KdDebuggerEnabled;
130 #define KD_DEBUGGER_ENABLED (*KdDebuggerEnabled)
133 #define KD_DEBUGGER_NOT_PRESENT (*KdDebuggerNotPresent)
134 #endif
135 
136 #if (NTDDI_VERSION >= NTDDI_WIN2K)
137 
139 NTSTATUS
140 NTAPI
142 
144 NTSTATUS
145 NTAPI
147 
148 #if (_MSC_FULL_VER >= 150030729) && !defined(IMPORT_NATIVE_DBG_BREAK)
149 #define DbgBreakPoint __debugbreak
150 #else
152 VOID
153 NTAPI
155 #endif
156 
158 NTSYSAPI
159 VOID
160 NTAPI
162  _In_ ULONG Status);
163 
164 #endif /* (NTDDI_VERSION >= NTDDI_WIN2K) */
165 
166 #if (NTDDI_VERSION >= NTDDI_WS03)
168 BOOLEAN
169 NTAPI
171 #endif
172 
173 #if (NTDDI_VERSION >= NTDDI_WS03SP1)
175 NTSTATUS
176 NTAPI
178  _In_ KD_OPTION Option,
179  _In_opt_ ULONG InBufferBytes,
180  _In_ PVOID InBuffer,
181  _In_opt_ ULONG OutBufferBytes,
182  _Out_ PVOID OutBuffer,
183  _Out_opt_ PULONG OutBufferNeeded);
184 #endif
#define __CREATE_NTOS_DATA_IMPORT_ALIAS(_Name)
_In_ __drv_aliasesMem PSTRING Prefix
Definition: rtlfuncs.h:1631
#define __cdecl
Definition: accygwin.h:79
#define DbgPrint
Definition: loader.c:25
NTSYSAPI ULONG NTAPI DbgPrompt(_In_z_ PCCH Prompt, _Out_writes_bytes_(MaximumResponseLength) PCH Response, _In_ ULONG MaximumResponseLength)
$if(_NTDDK_) NTSYSAPI ULONG NTAPI DbgPrompt(_In_z_ PCCH Prompt
Definition: ke.h:167
NTKERNELAPI NTSTATUS NTAPI KdEnableDebugger(VOID)
Definition: kdmain.c:327
LONG NTSTATUS
Definition: precomp.h:26
_In_ ULONGLONG _In_ ULONGLONG _In_ BOOLEAN Enable
Definition: ntddpcm.h:140
#define _WDMDDK_
Definition: wdm.template.h:26
_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:1264
#define NTSYSAPI
Definition: ntoskrnl.h:14
#define _In_opt_
Definition: no_sal2.h:213
__analysis_noreturn VOID NTAPI DbgBreakPoint(VOID)
Definition: mach.c:553
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
CHAR * PCH
Definition: ntbasedef.h:398
unsigned char BOOLEAN
_Out_writes_bytes_(MaximumResponseLength) PCH Response
#define _Out_
Definition: no_sal2.h:323
NTSYSAPI ULONG __cdecl DbgPrintEx(_In_ ULONG ComponentId, _In_ ULONG Level, _In_z_ _Printf_format_string_ PCSTR Format,...)
#define NTKERNELAPI
char * va_list
Definition: acmsvcex.h:78
NTKERNELAPI NTSTATUS NTAPI KdChangeOption(_In_ KD_OPTION Option, _In_opt_ ULONG InBufferBytes, _In_ PVOID InBuffer, _In_opt_ ULONG OutBufferBytes, _Out_ PVOID OutBuffer, _Out_opt_ PULONG OutBufferNeeded)
#define _Out_opt_
Definition: no_sal2.h:339
_In_ ULONG MaximumResponseLength
Definition: kdfuncs.h:11
CONST CHAR * PCCH
Definition: ntbasedef.h:399
VOID(* PDEBUG_PRINT_CALLBACK)(_In_ PSTRING Output, _In_ ULONG ComponentId, _In_ ULONG Level)
Definition: kdfuncs.h:86
NTSYSAPI ULONG NTAPI vDbgPrintEx(_In_ ULONG ComponentId, _In_ ULONG Level, _In_z_ PCCH Format, _In_ va_list ap)
Definition: ncftp.h:89
NTSYSAPI ULONG __cdecl DbgPrintReturnControlC(_In_z_ _Printf_format_string_ PCCH Format,...)
Definition: arc.h:85
#define VOID
Definition: acefi.h:82
$endif(_NTDDK_) $if(_WDMDDK_) ULONG __cdecl DbgPrint(_In_z_ _Printf_format_string_ PCSTR Format
Definition: iofuncs.h:2487
NTKERNELAPI NTSTATUS NTAPI KdDisableDebugger(VOID)
Definition: kdmain.c:295
Status
Definition: gdiplustypes.h:24
#define _In_
Definition: no_sal2.h:204
#define _In_z_
Definition: no_sal2.h:239
unsigned int * PULONG
Definition: retypes.h:1
NTSYSAPI NTSTATUS WINAPI vDbgPrintExWithPrefix(LPCSTR, ULONG, ULONG, LPCSTR, __ms_va_list)
__analysis_noreturn NTSYSAPI VOID NTAPI DbgBreakPointWithStatus(_In_ ULONG Status)
BOOLEAN * KdDebuggerEnabled
Definition: kdmain.c:16
NTKERNELAPI BOOLEAN NTAPI KdRefreshDebuggerNotPresent(VOID)
Definition: kdmain.c:282
NTSYSAPI NTSTATUS NTAPI DbgSetDebugFilterState(_In_ ULONG ComponentId, _In_ ULONG Level, _In_ BOOLEAN State)
void int int ULONGLONG int va_list * ap
Definition: winesup.h:32
unsigned int ULONG
Definition: retypes.h:1
enum _KD_OPTION KD_OPTION
NTSYSAPI NTSTATUS NTAPI DbgSetDebugPrintCallback(_In_ PDEBUG_PRINT_CALLBACK DebugPrintCallback, _In_ BOOLEAN Enable)
const char * PCSTR
Definition: typedefs.h:51
#define __analysis_noreturn
Definition: specstrings.h:61
BOOLEAN * KdDebuggerNotPresent
Definition: kdmain.c:18
#define _NTDDK_
#define _Printf_format_string_
Definition: no_sal2.h:569
NTSYSAPI NTSTATUS NTAPI DbgQueryDebugFilterState(_In_ ULONG ComponentId, _In_ ULONG Level)