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.

76 lines
2.2 KiB

  1. /*++
  2. Copyright (c) 2000 Microsoft Corporation
  3. Module Name:
  4. debug.cxx
  5. Abstract:
  6. This file contains debug routines to debug extenstion problems.
  7. Author:
  8. JasonHa
  9. --*/
  10. #include <precomp.hxx>
  11. #if DBG
  12. const char NoIndent[] = "";
  13. void
  14. vPrintNativeFieldInfo(
  15. PFIELD_INFO pFI,
  16. const char *pszIndent)
  17. {
  18. if (!pFI) return;
  19. DbgPrint(" %sPUCHAR fName = \"%s\"\n", pszIndent, pFI->fName);
  20. DbgPrint(" %sPUCHAR printName = \"%s\"\n", pszIndent, pFI->printName);
  21. DbgPrint(" %sULONG size = 0x%x\n", pszIndent, pFI->size);
  22. DbgPrint(" %sULONG fOptions = 0x%08x\n", pszIndent, pFI->fOptions);
  23. DbgPrint(" %sULONG64 address = 0x%I64x\n", pszIndent, pFI->address);
  24. DbgPrint(" %sPVOID fieldCallBack = 0x%p\n", pszIndent, pFI->fieldCallBack);
  25. }
  26. void
  27. vPrintNativeSymDumpParam(
  28. PSYM_DUMP_PARAM pSDP,
  29. BOOL bDumpFields,
  30. const char *pszIndent)
  31. {
  32. if (!pSDP) return;
  33. char pszNextIndent[80];
  34. _snprintf(pszNextIndent, sizeof(pszNextIndent), "%s ", pszIndent);
  35. DbgPrint(" %sULONG size = 0x%x\n", pszIndent, pSDP->size);
  36. DbgPrint(" %sPUCHAR sName = \"%s\"\n", pszIndent, pSDP->sName);
  37. DbgPrint(" %sULONG Options = 0x%08x\n", pszIndent, pSDP->Options);
  38. DbgPrint(" %sULONG64 addr = 0x%I64x\n", pszIndent, pSDP->addr);
  39. DbgPrint(" %sPFIELD_INFO listLink = 0x%p\n", pszIndent, pSDP->listLink);
  40. DbgPrint(" %sPVOID Context = 0x%p\n", pszIndent, pSDP->Context);
  41. DbgPrint(" %sPSYM_DUMP_FIELD_CALLBACK CallbackRoutine = 0x%p\n", pszIndent, pSDP->CallbackRoutine);
  42. DbgPrint(" %sULONG nFields = %d\n", pszIndent, pSDP->nFields);
  43. DbgPrint(" %sPFIELD_INFO Fields = 0x%p\n", pszIndent, pSDP->Fields);
  44. if (bDumpFields && pSDP->Fields)
  45. {
  46. for (ULONG nField = 0; nField < pSDP->nFields; nField++)
  47. {
  48. DbgPrint(" %sFIELD_INFO Fields[%d] = {\n", pszIndent, nField);
  49. vPrintNativeFieldInfo(&pSDP->Fields[nField], pszNextIndent);
  50. DbgPrint(" %s}\n", pszIndent);
  51. }
  52. }
  53. }
  54. #endif DBG