2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS kernel
4 * FILE: include/internal/debug.h
5 * PURPOSE: Useful debugging macros
6 * PROGRAMMER: David Welch (welch@mcmail.com)
12 * NOTE: Define NDEBUG before including this header to disable debugging
16 #ifndef __INTERNAL_DEBUG
17 #define __INTERNAL_DEBUG
19 #define UNIMPLEMENTED do {DbgPrint("%s at %s:%d is unimplemented, have a nice day\n",__FUNCTION__,__FILE__,__LINE__); for(;;); } while(0);
21 /* FIXME: should probably remove this later */
22 #if !defined(CHECKED) && !defined(NDEBUG)
28 #define assert(x) if (!(x)) {DbgPrint("Assertion "#x" failed at %s:%d\n", __FILE__,__LINE__); KeBugCheck(0); }
31 #define ASSERT(x) assert(x)
43 #define DPRINT1 DbgPrint("(%s:%d) ",__FILE__,__LINE__), DbgPrint
44 #define CHECKPOINT1 DbgPrint("%s:%d\n",__FILE__,__LINE__);
46 #define DPRINT1(args...)
47 #define CHECKPOINT1(args...)
57 #define DPRINT DbgPrint("(%s:%d) ",__FILE__,__LINE__), DbgPrint
58 #define CHECKPOINT DbgPrint("%s:%d\n",__FILE__,__LINE__);
60 #define DPRINT(args...)
65 * FUNCTION: Assert a maximum value for the current irql
69 #define ASSERT_IRQL(x) assert(KeGetCurrentIrql()<=(x))
70 #define assert_irql(x) assert(KeGetCurrentIrql()<=(x))
72 #endif /* __INTERNAL_DEBUG */