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.

58 lines
1.5 KiB

  1. //
  2. // Debugging information header
  3. // Copyright (c) Microsoft Corporation, 1997
  4. //
  5. //
  6. // header: debug.hxx
  7. // author: silviuc
  8. // created: Thu Jun 05 18:34:28 1997
  9. //
  10. #ifndef _DEBUG_HXX_INCLUDED_
  11. #define _DEBUG_HXX_INCLUDED_
  12. //
  13. // This debugging header should be included in every module of a project
  14. // in which debugging information is required.
  15. // The module that will contain definitions from `debug.hxx'
  16. // should contain the following definition before the inclusion:
  17. //
  18. // #define DEBUGINFO_DEFINITION_MODULE
  19. //
  20. // The main purpose is to offer some global values that can be queried
  21. // after a debug break, especially a non-source level debugger (kdbg, ntsd).
  22. // This is a very natural thing to do for programs in stress environments
  23. // where you usually debug the test through a kernel debugger.
  24. //
  25. //
  26. // DEFINE_DEBUGINFO_VARIABLE (name, type, default)
  27. //
  28. // Defines a variable having a name starting with `debuginfo'.
  29. //
  30. #ifdef DEBUGINFO_DEFINITION_MODULE
  31. #define DEFINE_DEBUGINFO_VARIABLE(name, type, default) \
  32. type debuginfo_##name = default
  33. #else
  34. #define DEFINE_DEBUGINFO_VARIABLE(name, type, default) \
  35. extern type debuginfo_##name = default
  36. #endif // #ifdef DEBUGINFO_DEFINITION_MODULE
  37. //
  38. // Here come the definitions of debug variables ...
  39. //
  40. // Example: DEFINE_DEBUGINFO_VARIABLE (status, char *, "alive");
  41. //
  42. DEFINE_DEBUGINFO_VARIABLE (status, char *, "alive");
  43. // ...
  44. #endif // #ifndef _DEBUG_HXX_INCLUDED_
  45. //
  46. // end of header: debug.hxx
  47. //