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.

58 lines
875 B

  1. #if DBG
  2. /*++
  3. Copyright (c) 1991 Microsoft Corporation
  4. Module Name:
  5. haldebug.c
  6. Abstract:
  7. This module contains debugging code for the HAL.
  8. Author:
  9. Thierry Fevrier 15-Jan-2000
  10. Environment:
  11. Kernel mode
  12. Revision History:
  13. --*/
  14. #include "halp.h"
  15. #include <stdarg.h>
  16. #include <stdio.h>
  17. UCHAR HalpDebugPrintBuffer[512];
  18. ULONG HalpUseDbgPrint = 0;
  19. VOID
  20. HalpDebugPrint(
  21. ULONG Level,
  22. PCCHAR Message,
  23. ...
  24. )
  25. {
  26. va_list ap;
  27. va_start(ap, Message);
  28. _vsnprintf( HalpDebugPrintBuffer, sizeof(HalpDebugPrintBuffer), Message, ap );
  29. va_end(ap);
  30. if ( !HalpUseDbgPrint ) {
  31. HalDisplayString( HalpDebugPrintBuffer );
  32. }
  33. else {
  34. DbgPrintEx( DPFLTR_HALIA64_ID, Level, HalpDebugPrintBuffer );
  35. }
  36. return;
  37. } // HalpDebugPrint()
  38. #endif // DBG