ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

debug.h
Go to the documentation of this file.
00001 /*
00002  * COPYRIGHT:   See COPYING in the top level directory
00003  * PROJECT:     ReactOS Ancillary Function Driver DLL
00004  * FILE:        include/debug.h
00005  * PURPOSE:     Debugging support macros
00006  * DEFINES:     DBG     - Enable debug output
00007  *              NASSERT - Disable assertions
00008  */
00009 #ifndef __DEBUG_H
00010 #define __DEBUG_H
00011 
00012 #define NORMAL_MASK    0x000000FF
00013 #define SPECIAL_MASK   0xFFFFFF00
00014 #define MIN_TRACE      0x00000001
00015 #define MID_TRACE      0x00000002
00016 #define MAX_TRACE      0x00000003
00017 
00018 #define DEBUG_CHECK    0x00000100
00019 #define DEBUG_ULTRA    0xFFFFFFFF
00020 
00021 #ifdef ASSERT
00022 #undef ASSERT
00023 #endif
00024 
00025 #if DBG
00026 
00027 extern DWORD DebugTraceLevel;
00028 
00029 #define AFD_DbgPrint(_t_, _x_) \
00030     if (((DebugTraceLevel & NORMAL_MASK) >= _t_) || \
00031         ((DebugTraceLevel & _t_) > NORMAL_MASK)) { \
00032         DbgPrint("(%hS:%d)(%hS) ", __FILE__, __LINE__, __FUNCTION__); \
00033         DbgPrint _x_; \
00034     }
00035 
00036 #ifdef NASSERT
00037 #define ASSERT(x)
00038 #else /* NASSERT */
00039 #define ASSERT(x) if (!(x)) { AFD_DbgPrint(MIN_TRACE, ("Assertion "#x" failed at %s:%d\n", __FILE__, __LINE__)); ExitProcess(0); }
00040 #endif /* NASSERT */
00041 
00042 #else /* DBG */
00043 
00044 #define AFD_DbgPrint(_t_, _x_)
00045 
00046 #define ASSERT_IRQL(x)
00047 #define ASSERT(x)
00048 
00049 #endif /* DBG */
00050 
00051 #ifdef assert
00052 #undef assert
00053 #endif
00054 #define assert(x) ASSERT(x)
00055 
00056 
00057 #define UNIMPLEMENTED \
00058     AFD_DbgPrint(MIN_TRACE, ("is unimplemented, please try again later.\n"));
00059 
00060 #define CHECKPOINT \
00061     AFD_DbgPrint(DEBUG_CHECK, ("\n"));
00062 
00063 #define CP CHECKPOINT
00064 
00065 #endif /* __DEBUG_H */
00066 
00067 /* EOF */

Generated on Sat May 26 2012 04:16:28 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.