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.

96 lines
1.8 KiB

  1. /******************************Module*Header*******************************\
  2. * Module Name: debugko.cxx
  3. *
  4. * Contains compile in routines that match the kernel debugger extensions
  5. *
  6. * Created: 16-jun-1995
  7. * Author: Andre Vachon [andreva]
  8. *
  9. * Copyright (c) 1990-1999 Microsoft Corporation
  10. \**************************************************************************/
  11. #include "precomp.hxx"
  12. GDIFunctionIDType UnknownGDIFunc = "Unidentified GDI Function";
  13. #if DBG_BASIC
  14. ULONG GreTraceDisplayDriverLoad = 0;
  15. ULONG GreTraceFontLoad = 0;
  16. LONG gWarningLevel = 0;
  17. // DoWarning1 is for ASM functions to call at Warning Level 1
  18. VOID DoWarning1(PSZ psz)
  19. {
  20. if (1 <= gWarningLevel)
  21. {
  22. DbgPrint("GDI: ");
  23. DbgPrint(psz);
  24. DbgPrint("\n");
  25. }
  26. }
  27. VOID DoWarning(PSZ psz, LONG ulLevel)
  28. {
  29. if (ulLevel <= gWarningLevel)
  30. {
  31. DbgPrint("GDI: ");
  32. DbgPrint(psz);
  33. DbgPrint("\n");
  34. }
  35. }
  36. VOID DoRip(PSZ psz)
  37. {
  38. if (gWarningLevel >= 0)
  39. {
  40. DbgPrint("GDI Assertion: ");
  41. DbgPrint(psz);
  42. DbgPrint("\n");
  43. DbgBreakPoint();
  44. }
  45. }
  46. VOID DoIDWarning(PCSTR ID, PSZ psz, LONG ulLevel)
  47. {
  48. if (ulLevel <= gWarningLevel)
  49. {
  50. DbgPrint("GDI: ");
  51. if (ID)
  52. {
  53. DbgPrint((PCH)ID);
  54. DbgPrint(": ");
  55. }
  56. DbgPrint(psz);
  57. DbgPrint("\n");
  58. }
  59. }
  60. VOID DoIDRip(PCSTR ID, PSZ psz)
  61. {
  62. if (gWarningLevel >= 0)
  63. {
  64. DbgPrint("GDI Assertion: ");
  65. if (ID)
  66. {
  67. DbgPrint((PCH)ID);
  68. DbgPrint(": ");
  69. }
  70. DbgPrint(psz);
  71. DbgPrint("\n");
  72. DbgBreakPoint();
  73. }
  74. }
  75. //
  76. // Font debugging
  77. //
  78. #define dprintf DbgPrint
  79. #include <kdftdbg.h>
  80. #endif