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 Novell Eagle 2000 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_MEMORY 0x00000100 00019 #define DEBUG_ULTRA 0xFFFFFFFF 00020 00021 #if DBG 00022 00023 extern ULONG DebugTraceLevel; 00024 00025 #ifdef _MSC_VER 00026 00027 #define NDIS_DbgPrint(_t_, _x_) \ 00028 if (((DebugTraceLevel & NORMAL_MASK) >= _t_) || \ 00029 ((DebugTraceLevel & _t_) > NORMAL_MASK)) { \ 00030 DbgPrint("(%s:%d) ", __FILE__, __LINE__); \ 00031 DbgPrint _x_ ; \ 00032 } 00033 00034 #else /* _MSC_VER */ 00035 00036 #define NDIS_DbgPrint(_t_, _x_) \ 00037 if (((DebugTraceLevel & NORMAL_MASK) >= _t_) || \ 00038 ((DebugTraceLevel & _t_) > NORMAL_MASK)) { \ 00039 DbgPrint("(%s:%d)(%s) ", __FILE__, __LINE__, __FUNCTION__); \ 00040 DbgPrint _x_ ; \ 00041 } 00042 00043 #endif /* _MSC_VER */ 00044 00045 00046 #define ASSERT_IRQL(x) ASSERT(KeGetCurrentIrql() <= (x)) 00047 #define ASSERT_IRQL_EQUAL(x) ASSERT(KeGetCurrentIrql() == (x)) 00048 00049 #else /* DBG */ 00050 00051 #define NDIS_DbgPrint(_t_, _x_) 00052 00053 #define ASSERT_IRQL(x) 00054 #define ASSERT_IRQL_EQUAL(x) 00055 /* #define ASSERT(x) */ /* ndis.h */ 00056 00057 #endif /* DBG */ 00058 00059 00060 #define assert(x) ASSERT(x) 00061 #define assert_irql(x) ASSERT_IRQL(x) 00062 00063 00064 #ifdef _MSC_VER 00065 00066 #define UNIMPLEMENTED \ 00067 NDIS_DbgPrint(MIN_TRACE, ("The function at %s:%d is unimplemented, \ 00068 but come back another day.\n", __FILE__, __LINE__)); 00069 00070 #else /* _MSC_VER */ 00071 00072 #define UNIMPLEMENTED \ 00073 NDIS_DbgPrint(MIN_TRACE, ("%s at %s:%d is unimplemented, \ 00074 but come back another day.\n", __FUNCTION__, __FILE__, __LINE__)); 00075 00076 #endif /* _MSC_VER */ 00077 00078 00079 #define CHECKPOINT \ 00080 do { NDIS_DbgPrint(MIN_TRACE, ("%s:%d\n", __FILE__, __LINE__)); } while(0); 00081 00082 /* EOF */ Generated on Sat May 26 2012 04:16:28 for ReactOS by
1.7.6.1
|