24 #ifndef _FXVERIFIER_H_ 25 #define _FXVERIFIER_H_ 28 #if defined(EVENT_TRACING) 29 #include "FxVerifier.h.tmh" 57 #if (FX_CORE_MODE == FX_CORE_USER_MODE) 58 #define FxVerifierBugCheck(FxDriverGlobals, Error, ...) \ 59 FX_VERIFY_WITH_NAME(DRIVER(BadAction, Error), \ 60 TRAPMSG("WDF Violation: Please check" \ 61 "tracelog for a description of this error"), \ 62 FxDriverGlobals->Public.DriverName) 64 #define FxVerifierBugCheck(FxDriverGlobals, ...) \ 65 FxVerifierBugCheckWorker(FxDriverGlobals, __VA_ARGS__); 78 #if FX_CORE_MODE == FX_CORE_KERNEL_MODE 84 Mx::MxDbgPrint(
"WDF detected potentially invalid operation by %s.%s " 85 "Dump the driver log (!wdflogdump %s.%s) for more information.\n",
86 FxDriverGlobals->Public.DriverName,
ext,
87 FxDriverGlobals->Public.DriverName,
ext 90 if (FxDriverGlobals->FxVerifierDbgBreakOnError) {
93 Mx::MxDbgPrint(
"Turn on framework verifier for %s.%s to automatically " 94 "break into the debugger next time it happens.\n",
95 FxDriverGlobals->Public.DriverName,
ext);
105 #if FX_CORE_MODE == FX_CORE_KERNEL_MODE 111 Mx::MxDbgPrint(
"WDF detected potentially invalid device state in %s.%s. " 112 "Dump the driver log (!wdflogdump %s.$s) for more information.\n",
113 FxDriverGlobals->Public.DriverName,
ext,
114 FxDriverGlobals->Public.DriverName,
ext);
116 if (FxDriverGlobals->FxVerifierDbgBreakOnDeviceStateError) {
119 Mx::MxDbgPrint(
"Turn on framework verifier for %s.%s to automatically " 120 "break into the debugger next time it happens.\n",
121 FxDriverGlobals->Public.DriverName,
ext);
131 if (FxDriverGlobals->FxEnhancedVerifierOptions &
179 if (FxDriverGlobals->FxVerifierOn) {
183 if (currentIrql <=
Irql) {
188 "Called at wrong IRQL; at level %d, should be " 189 "at level %d", currentIrql,
Irql);
209 if (FxDriverGlobals->FxEnhancedVerifierOptions &
224 if (FxDriverGlobals->FxEnhancedVerifierOptions &
239 if (FxDriverGlobals->FxEnhancedVerifierOptions &
254 if (FxDriverGlobals->FxEnhancedVerifierOptions &
263 #endif // _FXVERIFIER_H_ DECLSPEC_NORETURN VOID FxVerifierBugCheckWorker(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in WDF_BUGCHECK_CODES WdfBugCheckCode, __in_opt ULONG_PTR BugCheckParameter2=0, __in_opt ULONG_PTR BugCheckParameter3=0)
__inline VOID FxVerifierDbgBreakPoint(__in PFX_DRIVER_GLOBALS FxDriverGlobals)
__inline VOID FxVerifierBreakOnDeviceStateError(__in PFX_DRIVER_GLOBALS FxDriverGlobals)
#define STATUS_INVALID_DEVICE_REQUEST
__inline BOOLEAN IsFxVerifierTestForwardProgressFailAll(__in PFX_DRIVER_GLOBALS FxDriverGlobals)
#define DECLSPEC_NORETURN
DECLSPEC_NORETURN VOID FxVerifierNullBugCheck(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in PVOID ReturnAddress)
FxEnhancedVerifierBitFlags
static __inline VOID MxDbgBreakPoint()
__inline BOOLEAN IsFxVerifierFunctionTableHooking(__in PFX_DRIVER_GLOBALS FxDriverGlobals)
__inline NTSTATUS FxVerifierCheckIrqlLevel(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in KIRQL Irql)
static __inline KIRQL MxGetCurrentIrql()
WDF_EXTERN_C_START enum _WDF_BUGCHECK_CODES WDF_BUGCHECK_CODES
static VOID MxDbgPrint(__drv_formatString(printf) __in PCSTR DebugMessage,...)
#define TRACE_LEVEL_ERROR
__inline BOOLEAN IsFxVerifierTestForwardProgress(__in PFX_DRIVER_GLOBALS FxDriverGlobals)
DoTraceLevelMessage(pFxDriverGlobals, TRACE_LEVEL_VERBOSE, TRACINGPNP, "Enter, WDFDEVICE %p", Device)
__inline BOOLEAN IsFxVerifierTestForwardProgressFailRandom(__in PFX_DRIVER_GLOBALS FxDriverGlobals)
__inline BOOLEAN IsFxPerformanceAnalysis(__in PFX_DRIVER_GLOBALS FxDriverGlobals)