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.

79 lines
2.2 KiB

  1. /*****************************************************************************
  2. *
  3. * Copyright (c) 1998-1999 Microsoft Corporation
  4. *
  5. * DBGAPI.H - NT specific debugging macros, etc.
  6. *
  7. * Author: Stan Adermann (stana)
  8. *
  9. * Created: 9/3/1998
  10. *
  11. *****************************************************************************/
  12. #ifndef DBGAPI_H
  13. #define DBGAPI_H
  14. #define DBG_MSG_CNT 512
  15. #define MAX_MSG_LEN 128
  16. #define DBG_TIMER_INTERVAL 400
  17. extern ULONG DbgSettings;
  18. #define DBG_OUTPUT_DEBUGGER 1
  19. #define DBG_OUTPUT_BUFFER 2
  20. #define DEBUGZONE(bit) (1<<(bit))
  21. #define DBG_BREAK DEBUGZONE(31)
  22. #if DBG
  23. #define DEBUGMSG(dbgs,format) \
  24. if ((dbgs)&DbgSettings) \
  25. { \
  26. DbgMsg format; \
  27. if ((dbgs)&DbgSettings&DBG_BREAK) \
  28. { \
  29. DbgBreakPoint(); \
  30. } \
  31. }
  32. #define DEBUGMEM(dbgs, data, length, size) \
  33. if ((dbgs)&DbgSettings) \
  34. { \
  35. DbgMemory((data), (length), (size)); \
  36. }
  37. VOID DbgMsgInit();
  38. VOID DbgMsgUninit();
  39. VOID DbgMsg(CHAR *Format, ...);
  40. NTSTATUS DbgMsgIrp(PIRP pIrp, PIO_STACK_LOCATION pIrpSp);
  41. VOID DbgMemory(PVOID pMemory, ULONG Length, ULONG WordSize);
  42. VOID DbgRegInit(PUNICODE_STRING pRegistryPath, ULONG DefaultDebug);
  43. #define DEFAULT_DEBUG_OPTIONS(x) \
  44. { \
  45. DbgRegInit(pRegistryPath, (x)); \
  46. }
  47. #else
  48. #define RETAILMSG(cond,printf_exp) 0
  49. #define DEBUGMSG(cond,printf_exp) 0
  50. #define DBGCHK(module,exp) 0
  51. #define DEBUGCHK(exp) 0
  52. #define DEBUGREGISTER(hMod) 0
  53. #define DbgMsgInit() 0
  54. #define DbgMsgUninit() 0
  55. #define DEFAULT_DEBUG_OPTIONS(x)
  56. #define DEBUGMEM(dbgs, data, length, size) 0
  57. #endif
  58. #define DTEXT
  59. #endif //DBGAPI_H