Something went wrong. Try again.
Reactos
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697/* * PROJECT: ReactOS DC21x4 Driver * LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later) * PURPOSE: Debug support header file * COPYRIGHT: Copyright 2023 Dmitry Borisov <di.sean@protonmail.com> */
#pragma once
#ifndef __RELFILE__#define __RELFILE__ __FILE__#endif
#if DBG
// #define DEBUG_TRACE// #define DEBUG_INFO#define DEBUG_INFO_VERB#define DEBUG_WARN#define DEBUG_ERR
#ifdef DEBUG_TRACE#define TRACE(fmt, ...) \ do { \ if (DbgPrint("(%s:%d) %s " fmt, __RELFILE__, __LINE__, __FUNCTION__, ##__VA_ARGS__)) \ DbgPrint("(%s:%d) DbgPrint() failed!\n", __RELFILE__, __LINE__); \ } while (0)
#else#define TRACE#endif
#ifdef DEBUG_INFO#define INFO(fmt, ...) \ do { \ if (DbgPrint("(%s:%d) %s " fmt, __RELFILE__, __LINE__, __FUNCTION__, ##__VA_ARGS__)) \ DbgPrint("(%s:%d) DbgPrint() failed!\n", __RELFILE__, __LINE__); \ } while (0)
#else#define INFO#endif
#ifdef DEBUG_INFO_VERB#define INFO_VERB(fmt, ...) \ do { \ if (DbgPrint("(%s:%d) %s " fmt, __RELFILE__, __LINE__, __FUNCTION__, ##__VA_ARGS__)) \ DbgPrint("(%s:%d) DbgPrint() failed!\n", __RELFILE__, __LINE__); \ } while (0)
#else#define INFO_VERB#endif
#ifdef DEBUG_WARN#define WARN(fmt, ...) \ do { \ if (DbgPrint("(%s:%d) %s " fmt, __RELFILE__, __LINE__, __FUNCTION__, ##__VA_ARGS__)) \ DbgPrint("(%s:%d) DbgPrint() failed!\n", __RELFILE__, __LINE__); \ } while (0)
#else#define WARN#endif
#ifdef DEBUG_ERR#define ERR(fmt, ...) \ do { \ if (DbgPrint("(%s:%d) %s " fmt, __RELFILE__, __LINE__, __FUNCTION__, ##__VA_ARGS__)) \ DbgPrint("(%s:%d) DbgPrint() failed!\n", __RELFILE__, __LINE__); \ } while (0)
#else#define ERR#endif
PCSTRMediaNumber2Str( _In_ PDC21X4_ADAPTER Adapter, _In_ ULONG MediaNumber);
PCSTRDcDbgBusError( _In_ ULONG InterruptStatus);
#else
#define TRACE#define INFO#define INFO_VERB#define WARN#define ERR#define MediaNumber2Str#define DcDbgBusError
#endif