ReactOS 0.4.15-dev-7958-gcd0bb1a
debug.h
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS nVidia nForce Ethernet Controller Driver
3 * LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
4 * PURPOSE: Debugging support
5 * COPYRIGHT: Copyright 2021-2022 Dmitry Borisov <di.sean@protonmail.com>
6 */
7
8#pragma once
9
10#define MIN_TRACE 0x00000001
11#define MAX_TRACE 0x00000003
12
13#if DBG
14
15#ifndef NDEBUG
16
17#define NDIS_DbgPrint(_t_, _x_) \
18 do { \
19 if (DbgPrint("(%s:%d) %s ", __FILE__, __LINE__, __FUNCTION__)) \
20 DbgPrint("(%s:%d) DbgPrint() failed!\n", __FILE__, __LINE__); \
21 if (DbgPrint _x_) \
22 DbgPrint("(%s:%d) DbgPrint() failed!\n", __FILE__, __LINE__); \
23 } while(0)
24
25#else
26#define NDIS_DbgPrint(_t_, _x_) \
27 if (_t_ == MAX_TRACE) \
28 { \
29 if (DbgPrint("(%s:%d) %s ", __FILE__, __LINE__, __FUNCTION__)) \
30 DbgPrint("(%s:%d) DbgPrint() failed!\n", __FILE__, __LINE__); \
31 if (DbgPrint _x_) \
32 DbgPrint("(%s:%d) DbgPrint() failed!\n", __FILE__, __LINE__); \
33 }
34#endif
35
36#else
37
38#define NDIS_DbgPrint(_t_, _x_)
39
40#define ASSERT_IRQL(x)
41#define ASSERT_IRQL_EQUAL(x)
42
43#endif