⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bdadebug.h

📁 winddk src目录下的WDM源码压缩!
💻 H
字号:
//==========================================================================;
//
//  THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
//  KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
//  IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
//  PURPOSE.
//
//  Copyright (c) 1992 - 1998  Microsoft Corporation.  All Rights Reserved.
//
//==========================================================================;


#ifndef __BDADEBUG_H
#define __BDADEBUG_H
#ifdef __cplusplus
extern "C" {
#endif // __cplusplus

//======================================================;
//  Interfaces provided by this file:
//
//      All interfaces provided by this file only exist and generate
//      code when DEBUG is defined.  No code or data are generated when
//      DEBUG is not defined.
//
//      CDEBUG_BREAK()
//          Causes a trap #3, which hopefully will put you
//          in your debugger.
//
//      MDASSERT(exp)
//          If <exp> evaluates to false, prints a failure message
//          and calls CDEBUG_BREAK()
//
//      CdebugPrint(level, (printf_args));
//          If <level> is >= _CDebugLevel, then calls
//          DbgPrint(printf_args)
//
//======================================================;

#define DEBUG_BREAK     DbgBreakPoint()


#ifdef DEBUG

#define DEBUG_LEVEL     DEBUGLVL_VERBOSE     //DEBUGLVL_TERSE

#  if _X86_
#    define CDEBUG_BREAK()  { __asm { int 3 }; }
#  else
#    define CDEBUG_BREAK()  DbgBreakPoint()
#  endif

   extern char _CDebugAssertFail[];
#  define MDASSERT(exp) {\
    if ( !(exp) ) {\
        DbgPrint(_CDebugAssertFail, #exp, __FILE__, __LINE__); \
        CDEBUG_BREAK(); \
    }\
    }

extern enum STREAM_DEBUG_LEVEL _CDebugLevel;

#  define CDebugPrint(level, args) { if (level <= _CDebugLevel) DbgPrint args; }

#else /*DEBUG*/

#  define CDEBUG_BREAK()
#  define MDASSERT(exp)
#  define CDebugPrint(level, args)

#endif /*DEBUG*/


#ifdef __cplusplus
}
#endif // __cplusplus
#endif // #ifndef __BDADEBUG_H

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -