Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygendebug.h
Go to the documentation of this file.
00001 /* 00002 * COPYRIGHT: See COPYING in the top level directory 00003 * PROJECT: ReactOS WinSock 2 Helper DLL for TCP/IP 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_ULTRA 0xFFFFFFFF 00019 00020 #if DBG 00021 00022 extern DWORD DebugTraceLevel; 00023 00024 #define WSH_DbgPrint(_t_, _x_) \ 00025 if (((DebugTraceLevel & NORMAL_MASK) >= _t_) || \ 00026 ((DebugTraceLevel & _t_) > NORMAL_MASK)) { \ 00027 DbgPrint("(%hS:%d)(%hS) ", __FILE__, __LINE__, __FUNCTION__); \ 00028 DbgPrint _x_; \ 00029 } 00030 00031 #ifdef ASSERT 00032 #undef ASSERT 00033 #endif 00034 00035 #ifdef NASSERT 00036 #define ASSERT(x) 00037 #else /* NASSERT */ 00038 #define ASSERT(x) if (!(x)) { WSH_DbgPrint(MIN_TRACE, ("Assertion "#x" failed at %s:%d\n", __FILE__, __LINE__)); ExitProcess(0); } 00039 #endif /* NASSERT */ 00040 00041 #else /* DBG */ 00042 00043 #define WSH_DbgPrint(_t_, _x_) 00044 00045 #undef ASSERT 00046 #define ASSERT(x) 00047 00048 #endif /* DBG */ 00049 00050 00051 #undef assert 00052 #define assert(x) ASSERT(x) 00053 #define assert_irql(x) ASSERT_IRQL(x) 00054 00055 00056 #define UNIMPLEMENTED \ 00057 WSH_DbgPrint(MIN_TRACE, ("(%s:%d)(%s) is unimplemented, \ 00058 please try again later.\n", __FILE__, __LINE__, __FUNCTION__)); 00059 00060 #define CHECKPOINT \ 00061 WSH_DbgPrint(MIN_TRACE, ("\n")); 00062 00063 #define CP CHECKPOINT 00064 00065 #endif /* __DEBUG_H */ 00066 00067 /* EOF */ Generated on Sun May 27 2012 04:17:45 for ReactOS by
1.7.6.1
|