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.

154 lines
2.7 KiB

  1. #include "precomp.h"
  2. #pragma hdrstop
  3. #ifdef _obj
  4. # undef _obj
  5. # undef _objAddr
  6. # undef _objType
  7. #endif
  8. #define _obj Mdl
  9. #define _objAddr MdlToDump
  10. #define _objType MDL
  11. VOID
  12. DumpMdlChain
  13. (
  14. ULONG _objAddr,
  15. VERBOSITY Verbosity
  16. )
  17. {
  18. _objType _obj;
  19. ULONG result;
  20. if ( !ReadMemory( _objAddr,
  21. &_obj,
  22. sizeof( _obj ),
  23. &result ))
  24. {
  25. dprintf("%08lx: Could not read MDL structure\n", _objAddr );
  26. return;
  27. }
  28. PrintStartStruct();
  29. PrintPtr( Next );
  30. PrintUShort( Size );
  31. PrintXUShort( MdlFlags );
  32. PrintPtr( Process );
  33. PrintPtr( MappedSystemVa );
  34. PrintPtr( StartVa );
  35. PrintULong( ByteCount );
  36. PrintULong( ByteOffset );
  37. return;
  38. }
  39. VOID
  40. DumpCTELock
  41. (
  42. ULONG LockToDump,
  43. VERBOSITY Verbosity
  44. )
  45. {
  46. CTELock Lock;
  47. CTELock *pLock;
  48. ULONG result;
  49. pLock = ( CTELock * )LockToDump;
  50. if ( !ReadMemory( LockToDump,
  51. &Lock,
  52. sizeof( Lock ),
  53. &result ))
  54. {
  55. dprintf("%08lx: Could not read CTELock structure\n", LockToDump );
  56. return;
  57. }
  58. dprintf( "{ Lock = %d }", Lock );
  59. return;
  60. }
  61. #ifdef _obj
  62. # undef _obj
  63. # undef _objAddr
  64. # undef _objType
  65. #endif
  66. #define _obj Timer
  67. #define _objAddr pItem
  68. #define _objType CTETimer
  69. VOID
  70. DumpCTETimer
  71. (
  72. ULONG TimerToDump,
  73. VERBOSITY Verbosity
  74. )
  75. {
  76. CTETimer Timer;
  77. CTETimer *prTimer;
  78. ULONG result;
  79. prTimer = ( CTETimer * )TimerToDump;
  80. if ( !ReadMemory( TimerToDump,
  81. &Timer,
  82. sizeof( Timer ),
  83. &result ))
  84. {
  85. dprintf("%08lx: Could not read CTETimer structure\n", TimerToDump );
  86. return;
  87. }
  88. PrintStart;
  89. PrintULong( t_running );
  90. PrintLock( t_lock );
  91. PrintSymbolPtr( t_handler );
  92. PrintXULong( t_arg );
  93. // DPC
  94. // KTIMER
  95. PrintEnd;
  96. return;
  97. }
  98. #ifdef _obj
  99. # undef _obj
  100. # undef _objAddr
  101. # undef _objType
  102. #endif
  103. #define _obj QItem
  104. #define _objAddr prQItem
  105. #define _objType WORK_QUEUE_ITEM
  106. VOID
  107. DumpWorkQueueItem
  108. (
  109. ULONG ItemToDump,
  110. VERBOSITY Verbosity
  111. )
  112. {
  113. _objType _obj;
  114. _objType *_objAddr;
  115. ULONG result;
  116. _objAddr = ( _objType * )ItemToDump;
  117. if ( !ReadMemory( ItemToDump,
  118. &_obj,
  119. sizeof( _obj ),
  120. &result ))
  121. {
  122. dprintf( "%08lx: Could not read %s structure\n",
  123. ItemToDump,
  124. "WORK_QUEUE_ITEM" );
  125. return;
  126. }
  127. PrintStart;
  128. PrintLL( List );
  129. PrintSymbolPtr( WorkerRoutine );
  130. PrintXULong( Parameter );
  131. PrintEnd;
  132. return;
  133. }