ReactOS  0.4.15-dev-3182-g7b62228
fxverifierbugcheck.cpp
Go to the documentation of this file.
1 /*++
2 
3 Copyright (c) Microsoft Corporation
4 
5 Module Name:
6 
7  FxVerifierBugcheck.cpp
8 
9 Abstract:
10 
11  This file contains definitions of verifier bugcheck functions
12  These definitions are split from tracing.cpp in kmdf\src\core
13 
14 Author:
15 
16 
17 
18 
19 Environment:
20 
21  Both kernel and user mode
22 
23 Revision History:
24 
25 
26 --*/
27 
28 #include "fxobjectpch.hpp"
29 
30 // We use DoTraceMessage
31 extern "C" {
32 #if defined(EVENT_TRACING)
33 #include "FxVerifierBugcheck.tmh"
34 #endif
35 }
36 
37 //=============================================================================
38 //
39 //=============================================================================
40 
41 
43 VOID
45  __in PFX_DRIVER_GLOBALS FxDriverGlobals,
46  __in WDF_BUGCHECK_CODES WdfBugCheckCode,
47  __in_opt ULONG_PTR BugCheckParameter2,
48  __in_opt ULONG_PTR BugCheckParameter3
49  )
50 /*++
51 
52 Routine Description:
53  Wrapper for system BugCheck.
54 
55  Note this functions is marked "__declspec(noreturn)"
56 
57 Arguments:
58 
59 Returns:
60 
61 --*/
62 {
63  //
64  // Indicate to the BugCheck callback filter which IFR to dump.
65  //
66  FxDriverGlobals->FxForceLogsInMiniDump = TRUE;
67 
69  WdfBugCheckCode,
70  BugCheckParameter2,
71  BugCheckParameter3,
72  (ULONG_PTR) FxDriverGlobals );
73 }
74 
76 VOID
78  __in PFX_DRIVER_GLOBALS FxDriverGlobals,
79  __in PVOID ReturnAddress
80  )
81 /*++
82 
83 Routine Description:
84 
85  Calls KeBugCheckEx indicating a WDF DDI was passed a NULL parameter.
86 
87  Note this functions is marked "__declspec(noreturn)"
88 
89 Arguments:
90 
91 Returns:
92 
93 --*/
94 {
95 
97  "NULL Required Parameter Passed to a DDI\n"
98  "FxDriverGlobals 0x%p",
99  FxDriverGlobals
100  );
101 
102  FxVerifierBugCheck(FxDriverGlobals,
103  WDF_REQUIRED_PARAMETER_IS_NULL, // Bugcheck code.
104  0, // Parameter 2
105  (ULONG_PTR)ReturnAddress // Parameter 3
106  );
107 }
#define __in_opt
Definition: dbghelp.h:38
#define TRUE
Definition: types.h:120
#define DECLSPEC_NORETURN
Definition: ntbasedef.h:176
#define FxVerifierBugCheck(FxDriverGlobals, Error,...)
Definition: fxverifier.h:58
uint32_t ULONG_PTR
Definition: typedefs.h:65
#define TRACE_LEVEL_FATAL
Definition: storswtr.h:26
DECLSPEC_NORETURN VOID FxVerifierNullBugCheck(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in PVOID ReturnAddress)
WDF_EXTERN_C_START enum _WDF_BUGCHECK_CODES WDF_BUGCHECK_CODES
DoTraceLevelMessage(pFxDriverGlobals, TRACE_LEVEL_VERBOSE, TRACINGPNP, "Enter, WDFDEVICE %p", Device)
static DECLSPEC_NORETURN VOID MxBugCheckEx(__in ULONG BugCheckCode, __in ULONG_PTR BugCheckParameter1, __in ULONG_PTR BugCheckParameter2, __in ULONG_PTR BugCheckParameter3, __in ULONG_PTR BugCheckParameter4)
Definition: mxgeneralkm.h:133
#define TRACINGERROR
Definition: dbgtrace.h:63
#define __in
Definition: dbghelp.h:35
#define WDF_VIOLATION
Definition: mx.h:37
DECLSPEC_NORETURN VOID FxVerifierBugCheckWorker(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in WDF_BUGCHECK_CODES WdfBugCheckCode, __in_opt ULONG_PTR BugCheckParameter2, __in_opt ULONG_PTR BugCheckParameter3)