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
00004  * FILE:        include/debug.h
00005  * PURPOSE:     Debugging support macros
00006  * DEFINES:     DBG     - Enable debug output
00007  *              NASSERT - Disable assertions
00008  */
00009 
00010 #pragma once
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_IRP      0x00000200
00020 #define DEBUG_ULTRA    0xFFFFFFFF
00021 
00022 #if DBG
00023 
00024 extern DWORD DebugTraceLevel;
00025 
00026 #ifdef _MSC_VER
00027 
00028 #define AFD_DbgPrint(_t_, _x_) \
00029     if (((DebugTraceLevel & NORMAL_MASK) >= _t_) || \
00030         ((DebugTraceLevel & _t_) > NORMAL_MASK)) { \
00031         DbgPrint("(%s:%d) ", __FILE__, __LINE__); \
00032         DbgPrint _x_ ; \
00033     }
00034 
00035 #else /* _MSC_VER */
00036 
00037 #define AFD_DbgPrint(_t_, _x_) \
00038     if (((DebugTraceLevel & NORMAL_MASK) >= _t_) || \
00039         ((DebugTraceLevel & _t_) > NORMAL_MASK)) { \
00040         DbgPrint("(%s:%d)(%s) ", __FILE__, __LINE__, __FUNCTION__); \
00041         DbgPrint _x_ ; \
00042     }
00043 
00044 #endif /* _MSC_VER */
00045 
00046 #ifdef ASSERT
00047 #undef ASSERT
00048 #endif
00049 
00050 #ifdef NASSERT
00051 #define ASSERT(x)
00052 #else /* NASSERT */
00053 #define ASSERT(x) if (!(x)) { AFD_DbgPrint(MIN_TRACE, ("Assertion "#x" failed at %s:%d\n", __FILE__, __LINE__)); DbgBreakPoint(); }
00054 #endif /* NASSERT */
00055 
00056 #else /* DBG */
00057 
00058 #define AFD_DbgPrint(_t_, _x_)
00059 
00060 #define ASSERTKM(x)
00061 #ifndef ASSERT
00062 #define ASSERT(x)
00063 #endif
00064 
00065 #endif /* DBG */
00066 
00067 
00068 #undef assert
00069 #define assert(x) ASSERT(x)
00070 
00071 
00072 #ifdef _MSC_VER
00073 
00074 #define UNIMPLEMENTED \
00075     AFD_DbgPrint(MIN_TRACE, ("The function at %s:%d is unimplemented, \
00076         but come back another day.\n", __FILE__, __LINE__));
00077 
00078 #else /* _MSC_VER */
00079 
00080 #define UNIMPLEMENTED \
00081     AFD_DbgPrint(MIN_TRACE, ("%s at %s:%d is unimplemented, " \
00082         "but come back another day.\n", __FUNCTION__, __FILE__, __LINE__));
00083 
00084 #endif /* _MSC_VER */
00085 
00086 
00087 #define CHECKPOINT \
00088     AFD_DbgPrint(DEBUG_CHECK, ("\n"));
00089 
00090 #define CP CHECKPOINT
00091 
00092 /* EOF */

Generated on Sun May 27 2012 04:17:45 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.