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.

96 lines
4.6 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1997.
  5. //
  6. // File: D B G F L A G S . C P P
  7. //
  8. // Contents: DebugFlag list for the NetCfg Project
  9. //
  10. // Notes:
  11. //
  12. // Author: jeffspr 27 May 1997
  13. //
  14. //----------------------------------------------------------------------------
  15. #include <pch.h>
  16. #pragma hdrstop
  17. // None of this should get compiled in unless we're in the debug version
  18. // or we need to enable tracing code.
  19. //
  20. #if defined(DBG) || defined(ENABLETRACE)
  21. #include "ncdebug.h"
  22. //#include "ncbase.h"
  23. // This is the DebugFlag list that everyone should be modifying.
  24. //
  25. DEBUGFLAGELEMENT g_DebugFlags[] =
  26. {
  27. // :----------- DebugFlagId dfid
  28. // | :--------- CHAR [] szShortName
  29. // | | :------- CHAR [] szDescription
  30. // | | | DWORD dwValue ------------------------------------------------------------:
  31. // | | | |
  32. // | | | |
  33. // | | :-------------------------------------------: |
  34. // | :----------------------: | |
  35. // | | | |
  36. // v v v v
  37. //
  38. { dfidBreakOnAddLegacy, "BreakOnAddLegacy", "Break during HrAddLegacyAdapters", 0 },
  39. { dfidBreakOnAlloc, "BreakOnAlloc", "Break on Specified Alloc", 0 },
  40. { dfidBreakOnDoUnattend, "BreakOnDoUnattend", "Break during HrDoUnattend", 0 },
  41. { dfidBreakOnError, "BreakOnError", "Break on TraceError", 0 },
  42. { dfidBreakOnHr, "BreakOnHr", "Break when hr is specific value", 0 },
  43. { dfidBreakOnHrIteration, "BreakOnHrInteration", "Break when hr is hit N times", 0 },
  44. { dfidBreakOnIteration, "BreakOnIteration", "Break on Nth call to TraceError", 0 },
  45. { dfidBreakOnNetInstall, "BreakOnNetInstall", "Break during HrNetClassInstaller", 0 },
  46. { dfidBreakOnPrematureDllUnload,"BreakOnPrematureDllUnload","Break when DLL unloaded with open references", 0 },
  47. { dfidBreakOnWizard, "BreakOnWizard", "Break on Wizard", 0 },
  48. { dfidBreakOnStartOfUpgrade, "BreakOnStartOfUpgrade", "Break at the beginning of InstallUpgradeWorkThread", 0 },
  49. { dfidBreakOnEndOfUpgrade, "BreakOnEndOfUpgrade", "Break after all calls to HrDoUnattend have been completed", 0 },
  50. { dfidDisableShellThreading, "DisableShellThreading", "Disable shell thread pool usage", 0 },
  51. { dfidDisableTray, "DisableTray", "Disable Tray", 0 },
  52. { dfidExtremeTracing, "Extreme Tracing", "Output all traces, even on success", 0 },
  53. { dfidNetShellBreakOnInit, "NetShellBreakOnInit", "Break on Initialization of NetShell", 0 },
  54. { dfidNoErrorText, "NoErrorText", "Don't show wimpy error strings.", 0 },
  55. { dfidShowIgnoredErrors, "ShowIgnoredErrors", "Displays errors that would otherwise be ignored", 0 },
  56. { dfidShowProcessAndThreadIds, "ShowProcessAndThreadIds", "Displays process and thread id", 0 },
  57. { dfidSkipLanEnum, "SkipLanEnum", "Skip LAN Enumeration", 0 },
  58. { dfidTracingTimeStamps, "TracingTimeStamps", "Add time stamps to tracing output", 0 },
  59. { dfidShowIdsInHex, "ShowIdsInHex", "Displays process and therad ids in hex, not decimal", 0 },
  60. };
  61. const INT g_nDebugFlagCount = celems(g_DebugFlags);
  62. //+---------------------------------------------------------------------------
  63. //
  64. // Function: FIsDebugFlagSet
  65. //
  66. // Purpose: Return the state of a debug flag to the caller.
  67. //
  68. // Arguments:
  69. // dfid [] Debug Flag ID
  70. //
  71. // Returns: TRUE if set, FALSE otherwise.
  72. //
  73. // Author: jeffspr 28 May 1997
  74. //
  75. // Notes:
  76. //
  77. BOOL FIsDebugFlagSet( DEBUGFLAGID dfid )
  78. {
  79. return (g_DebugFlags[dfid].dwValue > 0);
  80. }
  81. DWORD DwReturnDebugFlagValue( DEBUGFLAGID dfid )
  82. {
  83. return (g_DebugFlags[dfid].dwValue);
  84. }
  85. #endif //! DBG || ENABLETRACE