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 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 WS_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)) { WS_DbgPrint(MIN_TRACE, ("Assertion "#x" failed at %s:%d\n", __FILE__, __LINE__)); ExitProcess(0); } 00040 #endif /* NASSERT */ 00041 00042 #else /* DBG */ 00043 00044 #define WS_DbgPrint(_t_, _x_) 00045 00046 #define ASSERT_IRQL(x) 00047 #define ASSERT(x) 00048 00049 #endif /* DBG */ 00050 00051 00052 #define assert(x) ASSERT(x) 00053 #define assert_irql(x) ASSERT_IRQL(x) 00054 00055 00056 #define UNIMPLEMENTED \ 00057 WS_DbgPrint(MIN_TRACE, ("is unimplemented, please try again later.\n")); 00058 00059 #define CHECKPOINT \ 00060 WS_DbgPrint(DEBUG_CHECK, ("\n")); 00061 00062 #define CP CHECKPOINT 00063 00064 #endif /* __DEBUG_H */ 00065 00066 /* EOF */ Generated on Sun May 27 2012 04:17:45 for ReactOS by
1.7.6.1
|