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 TCP/IP protocol 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_MEMORY   0x00000200
00020 #define DEBUG_PBUFFER  0x00000400
00021 #define DEBUG_IRP      0x00000800
00022 #define DEBUG_REFCOUNT 0x00001000
00023 #define DEBUG_ADDRFILE 0x00002000
00024 #define DEBUG_DATALINK 0x00004000
00025 #define DEBUG_ARP      0x00008000
00026 #define DEBUG_IP       0x00010000
00027 #define DEBUG_UDP      0x00020000
00028 #define DEBUG_TCP      0x00040000
00029 #define DEBUG_ICMP     0x00080000
00030 #define DEBUG_ROUTER   0x00100000
00031 #define DEBUG_RCACHE   0x00200000
00032 #define DEBUG_NCACHE   0x00400000
00033 #define DEBUG_CPOINT   0x00800000
00034 #define DEBUG_ULTRA    0xFFFFFFFF
00035 
00036 #if DBG
00037 
00038 extern DWORD DebugTraceLevel;
00039 
00040 #ifdef _MSC_VER
00041 
00042 #define LA_DbgPrint(_t_, _x_) \
00043     if (((DebugTraceLevel & NORMAL_MASK) >= _t_) || \
00044         ((DebugTraceLevel & _t_) > NORMAL_MASK)) { \
00045         DbgPrint("(%s:%d) ", __FILE__, __LINE__); \
00046         DbgPrint _x_ ; \
00047     }
00048 
00049 #else /* _MSC_VER */
00050 
00051 #define LA_DbgPrint(_t_, _x_) \
00052     if (((DebugTraceLevel & NORMAL_MASK) >= _t_) || \
00053         ((DebugTraceLevel & _t_) > NORMAL_MASK)) { \
00054         DbgPrint("(%s:%d)(%s) ", __FILE__, __LINE__, __FUNCTION__); \
00055         DbgPrint _x_ ; \
00056     }
00057 
00058 #endif /* _MSC_VER */
00059 
00060 #define ASSERT_IRQL(x) ASSERT(KeGetCurrentIrql() <= (x))
00061 
00062 #else /* DBG */
00063 
00064 #define LA_DbgPrint(_t_, _x_)
00065 
00066 #if 0
00067 #define ASSERT_IRQL(x)
00068 #define ASSERT(x)
00069 #endif
00070 
00071 #endif /* DBG */
00072 
00073 
00074 #define assert(x) ASSERT(x)
00075 #define assert_irql(x) ASSERT_IRQL(x)
00076 
00077 
00078 #ifdef _MSC_VER
00079 
00080 #define UNIMPLEMENTED \
00081     LA_DbgPrint(MIN_TRACE, ("The function at %s:%d is unimplemented, \
00082         but come back another day.\n", __FILE__, __LINE__));
00083 
00084 #else /* _MSC_VER */
00085 
00086 #define UNIMPLEMENTED \
00087     LA_DbgPrint(MIN_TRACE, ("(%s:%d)(%s) is unimplemented, \
00088         but come back another day.\n", __FILE__, __LINE__, __FUNCTION__));
00089 
00090 #endif /* _MSC_VER */
00091 
00092 
00093 #define CHECKPOINT \
00094     do { LA_DbgPrint(DEBUG_CHECK, ("(%s:%d)\n", __FILE__, __LINE__)); } while(0);
00095 
00096 #define CP CHECKPOINT
00097 
00098 #include <memtrack.h>

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.