ReactOS 0.4.16-dev-106-g10b08aa
debug.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define __RELFILE__   __FILE__
 
#define assert(x)   ((VOID) 0)
 
#define ASSERT(x)   ((VOID) 0)
 
#define ASSERTMSG(m, x)   ((VOID) 0)
 
#define __NOTICE(level, fmt, ...)   DbgPrint(#level ": %s at %s:%d " fmt, __FUNCTION__, __RELFILE__, __LINE__, ##__VA_ARGS__)
 
#define UNIMPLEMENTED
 
#define UNIMPLEMENTED_ONCE
 
#define DPRINT1(...)   do { if(0) { DbgPrint(__VA_ARGS__); } } while(0)
 
#define DPRINT(...)   do { if(0) { DbgPrint(__VA_ARGS__); } } while(0)
 
#define ERR_(ch, ...)   do { if(0) { DbgPrint(__VA_ARGS__); } } while(0)
 
#define WARN_(ch, ...)   do { if(0) { DbgPrint(__VA_ARGS__); } } while(0)
 
#define TRACE_(ch, ...)   do { if(0) { DbgPrint(__VA_ARGS__); } } while(0)
 
#define INFO_(ch, ...)   do { if(0) { DbgPrint(__VA_ARGS__); } } while(0)
 
#define ERR__(ch, ...)   do { if(0) { DbgPrint(__VA_ARGS__); } } while(0)
 
#define WARN__(ch, ...)   do { if(0) { DbgPrint(__VA_ARGS__); } } while(0)
 
#define TRACE__(ch, ...)   do { if(0) { DbgPrint(__VA_ARGS__); } } while(0)
 
#define INFO__(ch, ...)   do { if(0) { DbgPrint(__VA_ARGS__); } } while(0)
 
#define __ERROR_DBGBREAK(...)
 
#define __ERROR_FATAL(Status, ...)
 
#define ERROR_DBGBREAK(...)
 
#define UNIMPLEMENTED_DBGBREAK(...)
 
#define ERROR_FATAL(...)
 
#define UNIMPLEMENTED_FATAL(...)
 
#define ASSERT_IRQL_LESS_OR_EQUAL(x)   ASSERT(KeGetCurrentIrql()<=(x))
 
#define ASSERT_IRQL_EQUAL(x)   ASSERT(KeGetCurrentIrql()==(x))
 
#define ASSERT_IRQL_LESS(x)   ASSERT(KeGetCurrentIrql()<(x))
 
#define __STRING2__(x)   #x
 
#define __STRING__(x)   __STRING2__(x)
 
#define __STRLINE__   __STRING__(__LINE__)
 
#define __pragma(x)   _Pragma(#x)
 
#define _WARN(msg)   __pragma(message("WARNING! Line " __STRLINE__ ": " msg))
 

Functions

ULONG __cdecl DbgPrint (_In_z_ _Printf_format_string_ PCSTR Format,...)
 
NTSYSAPI ULONG __cdecl DbgPrintEx (_In_ ULONG ComponentId, _In_ ULONG Level, _In_z_ _Printf_format_string_ PCSTR Format,...)
 
__analysis_noreturn NTSYSAPI VOID NTAPI RtlAssert (_In_ PVOID FailedAssertion, _In_ PVOID FileName, _In_ ULONG LineNumber, _In_opt_z_ PCHAR Message)
 

Macro Definition Documentation

◆ __ERROR_DBGBREAK

#define __ERROR_DBGBREAK (   ...)
Value:
do { \
DbgPrint("" __VA_ARGS__); \
DbgBreakPoint(); \
} while (0)

Definition at line 202 of file debug.h.

◆ __ERROR_FATAL

#define __ERROR_FATAL (   Status,
  ... 
)
Value:
do { \
DbgPrint("" __VA_ARGS__); \
DbgBreakPoint(); \
TerminateCurrentProcess(Status); \
} while (0)
Status
Definition: gdiplustypes.h:25

Definition at line 209 of file debug.h.

◆ __NOTICE

#define __NOTICE (   level,
  fmt,
  ... 
)    DbgPrint(#level ": %s at %s:%d " fmt, __FUNCTION__, __RELFILE__, __LINE__, ##__VA_ARGS__)

Definition at line 92 of file debug.h.

◆ __pragma

#define __pragma (   x)    _Pragma(#x)

Definition at line 260 of file debug.h.

◆ __RELFILE__

#define __RELFILE__   __FILE__

Definition at line 18 of file debug.h.

◆ __STRING2__

#define __STRING2__ (   x)    #x

Definition at line 255 of file debug.h.

◆ __STRING__

#define __STRING__ (   x)    __STRING2__(x)

Definition at line 256 of file debug.h.

◆ __STRLINE__

#define __STRLINE__   __STRING__(__LINE__)

Definition at line 257 of file debug.h.

◆ _WARN

#define _WARN (   msg)    __pragma(message("WARNING! Line " __STRLINE__ ": " msg))

Definition at line 263 of file debug.h.

◆ assert

#define assert (   x)    ((VOID) 0)

Definition at line 71 of file debug.h.

◆ ASSERT

#define ASSERT (   x)    ((VOID) 0)

Definition at line 79 of file debug.h.

◆ ASSERT_IRQL_EQUAL

#define ASSERT_IRQL_EQUAL (   x)    ASSERT(KeGetCurrentIrql()==(x))

Definition at line 252 of file debug.h.

◆ ASSERT_IRQL_LESS

#define ASSERT_IRQL_LESS (   x)    ASSERT(KeGetCurrentIrql()<(x))

Definition at line 253 of file debug.h.

◆ ASSERT_IRQL_LESS_OR_EQUAL

#define ASSERT_IRQL_LESS_OR_EQUAL (   x)    ASSERT(KeGetCurrentIrql()<=(x))

Definition at line 251 of file debug.h.

◆ ASSERTMSG

#define ASSERTMSG (   m,
  x 
)    ((VOID) 0)

Definition at line 87 of file debug.h.

◆ DPRINT

#define DPRINT (   ...)    do { if(0) { DbgPrint(__VA_ARGS__); } } while(0)

Definition at line 154 of file debug.h.

◆ DPRINT1

#define DPRINT1 (   ...)    do { if(0) { DbgPrint(__VA_ARGS__); } } while(0)

Definition at line 153 of file debug.h.

◆ ERR_

#define ERR_ (   ch,
  ... 
)    do { if(0) { DbgPrint(__VA_ARGS__); } } while(0)

Definition at line 156 of file debug.h.

◆ ERR__

#define ERR__ (   ch,
  ... 
)    do { if(0) { DbgPrint(__VA_ARGS__); } } while(0)

Definition at line 161 of file debug.h.

◆ ERROR_DBGBREAK

#define ERROR_DBGBREAK (   ...)
Value:
do { \
__NOTICE(ERROR, "\n"); \
__ERROR_DBGBREAK(__VA_ARGS__); \
} while (0)
#define ERROR(name)
Definition: error_private.h:53

Definition at line 221 of file debug.h.

◆ ERROR_FATAL

#define ERROR_FATAL (   ...)
Value:
do { \
__NOTICE(UNRECOVERABLE ERROR, "\n"); \
__ERROR_FATAL(STATUS_ASSERTION_FAILURE, __VA_ARGS__); \
} while (0)
#define STATUS_ASSERTION_FAILURE
Definition: ntstatus.h:960

Definition at line 238 of file debug.h.

◆ INFO_

#define INFO_ (   ch,
  ... 
)    do { if(0) { DbgPrint(__VA_ARGS__); } } while(0)

Definition at line 159 of file debug.h.

◆ INFO__

#define INFO__ (   ch,
  ... 
)    do { if(0) { DbgPrint(__VA_ARGS__); } } while(0)

Definition at line 164 of file debug.h.

◆ TRACE_

#define TRACE_ (   ch,
  ... 
)    do { if(0) { DbgPrint(__VA_ARGS__); } } while(0)

Definition at line 158 of file debug.h.

◆ TRACE__

#define TRACE__ (   ch,
  ... 
)    do { if(0) { DbgPrint(__VA_ARGS__); } } while(0)

Definition at line 163 of file debug.h.

◆ UNIMPLEMENTED

#define UNIMPLEMENTED

Definition at line 137 of file debug.h.

◆ UNIMPLEMENTED_DBGBREAK

#define UNIMPLEMENTED_DBGBREAK (   ...)
Value:
do { \
__NOTICE(ERROR, "is UNIMPLEMENTED!\n"); \
__ERROR_DBGBREAK(__VA_ARGS__); \
} while (0)

Definition at line 227 of file debug.h.

◆ UNIMPLEMENTED_FATAL

#define UNIMPLEMENTED_FATAL (   ...)
Value:
do { \
__NOTICE(UNRECOVERABLE ERROR, "is UNIMPLEMENTED!\n"); \
__ERROR_FATAL(STATUS_NOT_IMPLEMENTED, __VA_ARGS__); \
} while (0)
#define STATUS_NOT_IMPLEMENTED
Definition: ntstatus.h:239

Definition at line 244 of file debug.h.

◆ UNIMPLEMENTED_ONCE

#define UNIMPLEMENTED_ONCE

Definition at line 138 of file debug.h.

◆ WARN_

#define WARN_ (   ch,
  ... 
)    do { if(0) { DbgPrint(__VA_ARGS__); } } while(0)

Definition at line 157 of file debug.h.

◆ WARN__

#define WARN__ (   ch,
  ... 
)    do { if(0) { DbgPrint(__VA_ARGS__); } } while(0)

Definition at line 162 of file debug.h.

Function Documentation

◆ DbgPrint()

ULONG __cdecl DbgPrint ( _In_z_ _Printf_format_string_ PCSTR  Format,
  ... 
)

◆ DbgPrintEx()

NTSYSAPI ULONG __cdecl DbgPrintEx ( _In_ ULONG  ComponentId,
_In_ ULONG  Level,
_In_z_ _Printf_format_string_ PCSTR  Format,
  ... 
)

◆ RtlAssert()

__analysis_noreturn NTSYSAPI VOID NTAPI RtlAssert ( _In_ PVOID  FailedAssertion,
_In_ PVOID  FileName,
_In_ ULONG  LineNumber,
_In_opt_z_ PCHAR  Message 
)