Source code of Windows XP (NT5)
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.

101 lines
2.0 KiB

  1. /*++
  2. Copyright (c) 1987-1993 Microsoft Corporation
  3. Module Name:
  4. debug.h
  5. Abstract:
  6. NtLmSsp service debug support
  7. Author:
  8. Ported from Lan Man 2.0
  9. Revision History:
  10. 21-May-1991 (cliffv)
  11. Ported to NT. Converted to NT style.
  12. 09-Apr-1992 JohnRo
  13. Prepare for WCHAR.H (_wcsicmp vs _wcscmpi, etc).
  14. --*/
  15. //
  16. // init.c will #include this file with DEBUG_ALLOCATE defined.
  17. // That will cause each of these variables to be allocated.
  18. //
  19. #ifdef DEBUG_ALLOCATE
  20. #define EXTERN
  21. #else
  22. #define EXTERN extern
  23. #endif
  24. ////////////////////////////////////////////////////////////////////////
  25. //
  26. // Debug Definititions
  27. //
  28. ////////////////////////////////////////////////////////////////////////
  29. #define SSP_INIT 0x00000001 // Initialization
  30. #define SSP_MISC 0x00000002 // Misc debug
  31. #define SSP_API 0x00000004 // API processing
  32. #define SSP_LPC 0x00000008 // LPC
  33. #define SSP_CRITICAL 0x00000100 // Only real important errors
  34. //
  35. // Very verbose bits
  36. //
  37. #define SSP_API_MORE 0x04000000 // verbose API
  38. #define SSP_LPC_MORE 0x08000000 // verbose LPC
  39. //
  40. // Control bits.
  41. //
  42. #define SSP_TIMESTAMP 0x20000000 // TimeStamp each output line
  43. #define SSP_REQUEST_TARGET 0x40000000 // Force client to ask for target name
  44. #define SSP_USE_OEM 0x80000000 // Force client to use OEM character set
  45. //
  46. // Name and directory of log file
  47. //
  48. #ifdef DEBUGRPC
  49. #define ASSERT(con) \
  50. if (!(con)) \
  51. SspPrint((SSP_MISC, "Assert %s(%d): "#con"\n", __FILE__, __LINE__));
  52. EXTERN DWORD SspGlobalDbflag;
  53. #define IF_DEBUG(Function) \
  54. if (SspGlobalDbflag & SSP_ ## Function)
  55. #define SspPrint(_x_) SspPrintRoutine _x_
  56. void
  57. SspPrintRoutine(
  58. IN ULONG DebugFlag,
  59. IN PCHAR FORMATSTRING, // PRINTF()-STYLE FORMAT STRING.
  60. ... // OTHER ARGUMENTS ARE POSSIBLE.
  61. );
  62. #else
  63. #define ASSERT(con)
  64. #define IF_DEBUG(Function) if (FALSE)
  65. // Nondebug version.
  66. #define SspPrint(_x_)
  67. #endif // DEBUGRPC
  68. #undef EXTERN