Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

80 lines
1.6 KiB

  1. #ifndef __IRCOMM_DEBUG__
  2. #define __IRCOMM_DEBUG__
  3. extern ULONG DebugMemoryTag;
  4. extern ULONG DebugFlags;
  5. #define ALLOCATE_PAGED_POOL(_y) ExAllocatePoolWithTag(PagedPool,_y, DebugMemoryTag)
  6. #define ALLOCATE_NONPAGED_POOL(_y) ExAllocatePoolWithTag(NonPagedPool,_y,DebugMemoryTag)
  7. #define FREE_POOL(_x) {ExFreePool(_x);_x=NULL;};
  8. #if DBG
  9. #define DEBUG_FLAG_ERROR 0x0001
  10. #define DEBUG_FLAG_INIT 0x0002
  11. #define DEBUG_FLAG_PNP 0x0004
  12. #define DEBUG_FLAG_POWER 0x0008
  13. #define DEBUG_FLAG_WMI 0x0010
  14. #define DEBUG_FLAG_TRACE0 0x0020
  15. #define DEBUG_FLAG_TRACE1 0x0040
  16. #define DEBUG_FLAG_TRACE2 0x0080
  17. #define DEBUG_FLAG_ENUM 0x0100
  18. #define DEBUG_FLAG_TRACE DEBUG_FLAG_TRACE0
  19. #define D_ERROR(_x) if (DebugFlags & DEBUG_FLAG_ERROR) {_x}
  20. #define D_INIT(_x) if (DebugFlags & DEBUG_FLAG_INIT) {_x}
  21. #define D_PNP(_x) if (DebugFlags & DEBUG_FLAG_PNP) {_x}
  22. #define D_POWER(_x) if (DebugFlags & DEBUG_FLAG_POWER) {_x}
  23. #define D_TRACE(_x) if (DebugFlags & DEBUG_FLAG_TRACE) {_x}
  24. #define D_TRACE1(_x) if (DebugFlags & DEBUG_FLAG_TRACE1) {_x}
  25. #define D_TRACE2(_x) if (DebugFlags & DEBUG_FLAG_TRACE2) {_x}
  26. #define D_ENUM(_x) if (DebugFlags & DEBUG_FLAG_ENUM) {_x}
  27. #define D_WMI(_x) if (DebugFlags & DEBUG_FLAG_WMI) {_x}
  28. #else
  29. #define D_ERROR(_x) {}
  30. #define D_INIT(_x) {}
  31. #define D_PNP(_x) {}
  32. #define D_POWER(_x) {}
  33. #define D_TRACE(_x) {}
  34. #define D_TRACE1(_x) {}
  35. #define D_TRACE2(_x) {}
  36. #define D_ENUM(_x) {}
  37. #define D_WMI(_x) {}
  38. #endif
  39. VOID
  40. DumpBuffer(
  41. PUCHAR Data,
  42. ULONG Length
  43. );
  44. #endif // __IRCOMM_DEBUG__