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.

324 lines
22 KiB

  1. /*++
  2. Copyright (c) 1992 Microsoft Corporation
  3. Module Name:
  4. .c
  5. Abstract:
  6. WinDbg Extension Api
  7. Revision History:
  8. --*/
  9. #include "precomp.h"
  10. DECLARE_API( help )
  11. {
  12. dprintf("acpiinf - Displays ACPI Information structure\n" );
  13. dprintf("acpiirqarb - Displays ACPI IRQ Arbiter data\n" );
  14. dprintf("arbiter [flags] - Displays all arbiters and arbitrated ranges\n");
  15. dprintf(" flags: 1 - I/O arbiters\n");
  16. dprintf(" 2 - Memory arbiters\n");
  17. dprintf(" 4 - IRQ arbiters\n");
  18. dprintf(" 8 - DMA arbiters\n");
  19. dprintf(" 10 - Bus Number arbiters\n");
  20. dprintf("arblist <address> [flags] - Dump set of resources being arbitrated\n");
  21. dprintf(" flags: 1 - Include Interface and Slot info per device\n");
  22. dprintf("blockeddrv - Dumps the list of blocked drivers in the system\n");
  23. dprintf("bpid <pid> - Tells winlogon to do a user-mode break into process <pid>\n");
  24. dprintf("bugdump - Display bug check dump data\n" );
  25. dprintf("bushnd [address] - Dump a HAL \"BUS HANDLER\" structure [address] if\n");
  26. dprintf(" specified is the handler to be dumped. If not\n");
  27. dprintf(" specified, dumps the list of handlers (brief).\n");
  28. dprintf("ca <address> [flags] - Dump the control area of a section\n");
  29. dprintf("calldata <table name> - Dump call data hash table\n" );
  30. dprintf("cmreslist <CM Resource List> - Dump CM resource list\n" );
  31. dprintf("db <physical address> - Display physical memory\n");
  32. dprintf("dd <physical address> - Display physical memory\n");
  33. dprintf("dblink <address> [count] [bias] - Dumps a list via its blinks\n");
  34. dprintf("dflink <address> [count] [bias] - Dumps a list via its flinks\n");
  35. dprintf(" bias - a mask of bits to ignore in each pointer\n");
  36. dprintf("defwrites - Dumps the deferred write queue and\n");
  37. dprintf(" and triages cached write throttles\n");
  38. dprintf("devext <address> <type> - Dump device extension at\n");
  39. dprintf(" <address> of type <type>\n");
  40. dprintf(" <type> is on of the following: \n");
  41. dprintf(" PCI, PCMCIA, USBD, OpenHCI,\n");
  42. dprintf(" USBHUB, UHCD, HID\n");
  43. dprintf("devinst - dumps the device reference table\n");
  44. dprintf("devnode <device node> [flags] [service] - Dump the device node\n");
  45. dprintf(" device node: 0 - list main tree\n");
  46. dprintf(" 1 - list pending removals\n");
  47. dprintf(" 2 - list pending ejects\n");
  48. dprintf(" address - list specified devnode\n");
  49. dprintf(" flags: 1 - dump children\n");
  50. dprintf(" 2 - dump CM Resource List\n");
  51. dprintf(" 4 - dump IO Resource List\n");
  52. dprintf(" 8 - dump translated CM Resource List\n");
  53. dprintf(" 10 - dump only devnodes that aren't started\n");
  54. dprintf(" 20 - dump only devnodes that have problems\n");
  55. dprintf(" service: if present only devnodes driven\n");
  56. dprintf(" by this service (and all their children if\n");
  57. dprintf(" the flags indicate so) are dumped\n");
  58. dprintf("devobj <device> - Dump the device object and Irp queue\n");
  59. dprintf(" <device> - device object address or name\n");
  60. dprintf("devstack <device> - Dump device stack associated with device object\n");
  61. dprintf("drvobj <driver> [flags] - Dump the driver object and related information\n");
  62. dprintf(" <driver> - driver object address or name\n");
  63. dprintf(" flags:1 - Dump device object list\n");
  64. dprintf(" flags:2 - Dump driver entry points\n");
  65. dprintf("drivers - Display information about loaded system modules\n");
  66. dprintf("e820reslist <List> - Dump an ACPI_BIOS_MULTI_NODE resource list\n");
  67. dprintf("eb <physical address> <byte> <byte, byte ,...> - modify physical memory\n");
  68. dprintf("ed <physical address> <dword> <dword,dword,...> - modify physical memory\n");
  69. dprintf("errlog - Dump the error log contents\n");
  70. dprintf("exqueue [flags] - Dump the ExWorkerQueues\n");
  71. dprintf(" flags: 1/2/4 - same as !thread/!process\n");
  72. dprintf(" 10 - only critical work queue\n");
  73. dprintf(" 20 - only delayed work queue\n");
  74. dprintf(" 40 - only hypercritical work queue\n");
  75. dprintf("facs - Dumps the Firmware ACPI Control Structure\n");
  76. dprintf("fadt - Dumps the Fixed ACPI Description Table\n");
  77. dprintf("filecache - Dumps information about the file system cache\n");
  78. dprintf("filetime - Dumps a 64-bit FILETIME as a human-readable time\n");
  79. dprintf("filelock <address> - Dump a file lock structure - address is either the filelock or a fileobject\n");
  80. dprintf("fpsearch <address> - Find a freed special pool allocation\n");
  81. dprintf("frag [flags] - Kernel mode pool fragmentation\n");
  82. dprintf(" flags: 1 - List all fragment information\n");
  83. dprintf(" 2 - List allocation information\n");
  84. dprintf(" 3 - both\n");
  85. dprintf("gentable <address> - Dumps the given rtl_generic_table\n");
  86. dprintf("gbl - Dumps the ACPI Global Lock\n");
  87. dprintf("handle <addr> <flags> <process> <TypeName> - Dumps handle for a process\n");
  88. dprintf(" flags: -2 Dump non-paged object\n");
  89. dprintf("heap <addr> [flags] - Dumps heap for a process\n");
  90. dprintf(" flags: -v Verbose\n");
  91. dprintf(" -f Free List entries\n");
  92. dprintf(" -a All entries\n");
  93. dprintf(" -s Summary\n");
  94. dprintf(" -x Force a dump even if the data is bad\n");
  95. dprintf(" address: desired heap to dump or 0 for all\n");
  96. dprintf("help - Displays this list\n" );
  97. dprintf("HidPpd <address> <flags> - Dump Preparsed Data of HID device\n");
  98. dprintf("ib <port> - Read a byte from an I/O port\n");
  99. dprintf("id <port> - Read a double-word from an I/O port\n");
  100. dprintf("idt <vector> - Dump ISRs referenced by each IDT entry\n");
  101. dprintf("iw <port> - Read a word from an I/O port\n");
  102. dprintf("ioreslist <IO Resource List> - Dump IO resource requirements list\n" );
  103. dprintf("irp <address> <dumplevel> - Dump Irp at specified address\n");
  104. dprintf(" address == 0 Dump active IRPs (checked only)\n");
  105. dprintf(" dumplevel: 0 Basic stack info\n");
  106. dprintf(" dumplevel: 1 Full field dump\n");
  107. dprintf(" dumplevel: 2 Include tracking information (checked only)\n");
  108. dprintf("irpfind [pooltype] [restart addr] [<irpsearch> <address>]- Search pool for active Irps\n");
  109. dprintf(" pooltype is 0 for nonpaged pool (default)\n");
  110. dprintf(" pooltype is 1 for paged pool\n");
  111. dprintf(" pooltype is 2 for special pool\n");
  112. dprintf(" restart addr - if specfied, scan will be restarted from \n");
  113. dprintf(" this location in pool\n");
  114. dprintf(" <irpsearch> - specifies filter criteria to find a specific irp\n");
  115. dprintf(" 'userevent' - finds IRPs where Irp.UserEvent == <address>\n");
  116. dprintf(" 'device' - finds IRPs with a stack location where DeviceObject == <address>\n");
  117. dprintf(" 'fileobject' - finds IRPs where Irp.Tail.Overlay.OriginalFileObject == <address>\n");
  118. dprintf(" 'mdlprocess' - finds IRPs where Irp.MdlAddress.Process == <address>\n");
  119. dprintf(" 'thread' - finds IRPs where Irp.Tail.Overlay.Thread == <address>\n");
  120. dprintf(" 'arg' - finds IRPs with one of the args == <address>\n");
  121. dprintf("job <address> [<flags>] - Dump JobObject at address, processes in job\n");
  122. dprintf("lbt - Dump legacy bus information table\n");
  123. dprintf("locks [-v] <address> - Dump kernel mode resource locks\n");
  124. dprintf("lookaside <address> <options> <depth> - Dump lookaside lists\n");
  125. dprintf(" options - 1 Reset Counters\n");
  126. dprintf(" options - 2 <depth> Set depth\n");
  127. dprintf("lpc - Dump lpc ports and messages\n");
  128. dprintf("mapic - Dumps the ACPI Multiple APIC Table\n");
  129. dprintf("memusage - Dumps the page frame database table\n");
  130. dprintf("nsobj <address> - Dumps an ACPI Namespace Object\n");
  131. dprintf("nstree [<address>] - Dumps an ACPI Namespace Object and its children\n");
  132. dprintf("ob <port> - Write a byte to an I/O port\n");
  133. dprintf("obja <TypeName> - Dumps an object manager object's attributes\n");
  134. dprintf("object <-r | Path | address | 0 TypeName> - Dumps an object manager object\n");
  135. dprintf(" -r - Force reload of cached object pointers\n");
  136. dprintf("od <port> - Write a double-word to an I/O port\n");
  137. dprintf("openmaps <shared cache map > - Dumps the active views for a given shared cache map\n");
  138. dprintf("ow <port> - Write a word to an I/O port\n");
  139. dprintf("patch - Enable and disable various driver flags\n");
  140. dprintf("pcitree - Dump the PCI tree structure (use)\n");
  141. dprintf(" '!devext <addr> pci' for details\n");
  142. dprintf(" on individual devices.\n");
  143. dprintf("pfn - Dumps the page frame database entry for the physical page\n");
  144. dprintf("pnpevent <event entry> - Dump PNP events\n");
  145. dprintf(" event entry: 0 - list all queued events\n");
  146. dprintf(" address - list specified event\n");
  147. dprintf("pocaps - Dumps System Power Capabilities.\n");
  148. dprintf("podev <devobj> - Dumps power relevent data in device object\n");
  149. dprintf("polist [<devobj>] - Dumps power Irp serial list entries\n");
  150. dprintf("ponode - Dumps power Device Node stack (devnodes in power order)\n");
  151. dprintf("popolicy - Dumps System Power Policy.\n");
  152. dprintf("poproc <Address> - Dumps Processor Power State.\n");
  153. dprintf("poReqList [<devobj>] - Dumps PoRequestedPowerIrp created Power Irps\n");
  154. dprintf("pool <address> [detail] - Dump kernel mode heap\n");
  155. dprintf(" address: 0 or blank - Only the process heap\n");
  156. dprintf(" -1 - All heaps in the process\n");
  157. dprintf(" Otherwise for the heap address listed\n");
  158. dprintf(" detail: 0 - Summary Information\n");
  159. dprintf(" 1 - Above + location/size of regions\n");
  160. dprintf(" 2 - Print information only for address\n");
  161. dprintf(" 3 - Above + allocated/free blocks in committed regions\n");
  162. dprintf(" 4 - Above + free lists\n");
  163. dprintf("poolfind Tag [pooltype] - - Finds occurrences of the specified Tag\n");
  164. dprintf(" Tag is 4 character tag, * and ? are wild cards\n");
  165. dprintf(" pooltype is 0 for nonpaged pool (default)\n");
  166. dprintf(" pooltype is 1 for paged pool\n");
  167. dprintf(" pooltype is 2 for special pool\n");
  168. dprintf(" NOTE - this can take a long time!\n");
  169. dprintf("poolused [flags [TAG]] - Dump usage by pool tag\n");
  170. dprintf(" flags: 1 Verbose\n");
  171. dprintf(" flags: 2 Sort by NonPagedPool Usage\n");
  172. dprintf(" flags: 4 Sort by PagedPool Usage\n");
  173. dprintf("portcls <devobj> [flags] - Dumps portcls data for portcls bound devobj\n");
  174. dprintf(" flags: 1 - Port Dump\n");
  175. dprintf(" flags: 2 - Filter Dump\n");
  176. dprintf(" flags: 4 - Pin Dump\n");
  177. dprintf(" flags: 8 - Device Context\n");
  178. dprintf(" flags: 10 - Power Info\n");
  179. dprintf(" flags:100 - Verbose\n");
  180. dprintf(" flags:200 - Really Verbose\n");
  181. dprintf("potrigger <address> - Dumps POP_ACTION_TRIGGER.\n");
  182. dprintf("process [flags] [image name] - Dumps process at specified address\n");
  183. dprintf(" (dumps only the process with specified image name, if given)\n");
  184. dprintf(" flags: 1 - don't stop after cid/image information\n");
  185. dprintf(" 2 - dump thread wait states\n");
  186. dprintf(" 4 - dump only thread states, combine with 2 to get stack\n");
  187. if (TargetMachine==IMAGE_FILE_MACHINE_IA64) {
  188. dprintf(" 8 - dump return address and BSP in stacktrace\n");
  189. }
  190. dprintf("pte <address> - Dump PDE and PTE for the entered address\n");
  191. dprintf("ptov PhysicalPageNumber - Dump all valid physical<->virtual mappings\n");
  192. dprintf(" for the given page directory\n");
  193. dprintf("qlocks - Dumps state of all queued spin locks\n");
  194. dprintf("range <RtlRangeList> - Dump RTL_RANGE_LIST\n");
  195. dprintf("ready - Dumps state of all READY system threads\n");
  196. dprintf("reg <command> <params> - Registry extensions\n");
  197. dprintf(" kcb <Address> - Dump registry key-control-blocks\n");
  198. dprintf(" knode <Address> - Dump registry key-node struct\n");
  199. dprintf(" kbody <Address> - Dump registry key-body struct\n");
  200. dprintf(" kvalue <Address> - Dump registry key-value struct\n");
  201. dprintf(" baseblock <HiveAddr> - Dump the baseblock for the specified hive\n");
  202. dprintf(" seccache <HiveAddr> - Dump the security cache for the specified hive\n");
  203. dprintf(" hashindex <conv_key> - Find the hash entry given a Kcb ConvKey\n");
  204. dprintf(" openkeys <HiveAddr|0> - Dump the keys opened inside the specified hive\n");
  205. dprintf(" findkcb <FullKeyPath> - Find the kcb for the corresponding path\n");
  206. dprintf(" hivelist - Displays the list of the hives in the system\n");
  207. dprintf(" viewlist <HiveAddr> - Dump the pinned/mapped view list for the specified hive\n");
  208. dprintf(" freebins <HiveAddr> - Dump the free bins for the specified hive\n");
  209. dprintf(" freeceells <BinAddr> - Dump the free free cells in the specified bin\n");
  210. dprintf(" dirtyvector<HiveAddr> - Dump the dirty vector for the specified hive\n");
  211. dprintf(" cellindex <HiveAddr> <cellindex> - Finds the VA for a specified cell index\n");
  212. dprintf(" freehints <HiveAddr> <Storage> <Display> - Dumps freehint info\n");
  213. dprintf(" dumppool [s|r] - Dump registry allocated paged pool\n");
  214. dprintf(" s - Save list of registry pages to temporary file\n");
  215. dprintf(" r - Restore list of registry pages from temp. file\n");
  216. dprintf("rellist <relation list> [flags] - Dump PNP relation lists\n");
  217. dprintf(" relation list: address - list specified relation list\n");
  218. dprintf(" flags: 1 - not used\n");
  219. dprintf(" 2 - dump CM Resource List\n");
  220. dprintf(" 4 - dump IO Resource List\n");
  221. dprintf(" 8 - dump translated CM Resource List\n");
  222. dprintf("remlock - Dump a remove lock structure\n");
  223. dprintf("rsdt - Finds and dumps the ACPI Root System Description Table\n");
  224. dprintf("session <Id> [flags] [image name] - Dumps sessions\n");
  225. dprintf(" (dumps only the process with specified image name, if given)\n");
  226. dprintf("socket <address> - Dump pcmcia socket structure\n");
  227. dprintf("srb <address> - Dump Srb at specified address\n");
  228. dprintf("stacks <detail-level> - Dump summary of current kernel stacks\n");
  229. dprintf(" detail-level: 0 Display stack summary\n");
  230. dprintf(" detail-level: 1 Display stacks, no parameters\n");
  231. dprintf(" detail-level: 2 Display stacks, full parameters\n");
  232. dprintf("sysptes - Dumps the system PTEs\n");
  233. dprintf("thread [flags] - Dump current thread, or specified thread,\n");
  234. dprintf(" or with stack containing address\n");
  235. dprintf(" flags: 1 - not used\n");
  236. dprintf(" 2 - dump thread wait states\n");
  237. dprintf(" 4 - dump only thread states, combine with 2 to get stack\n");
  238. if (TargetMachine==IMAGE_FILE_MACHINE_IA64) {
  239. dprintf(" 8 - dump return address and BSP in stacktrace\n");
  240. }
  241. dprintf("time - Reports PerformanceCounterRate and TimerDifference\n");
  242. dprintf("timer - Dumps timer tree\n");
  243. dprintf("token [flags] - Dump token at specified address\n");
  244. dprintf("tunnel <address> - Dump a file property tunneling cache\n");
  245. dprintf("tz [<address> <flags>] - Dumps Thermal Zones. No Args dumps All TZs\n");
  246. dprintf("tzinfo <address> - Dumps Thermal Zone Information.\n");
  247. dprintf("urb <address> <flags> - Dump a USB Request Block\n");
  248. dprintf("usblog <log> [addr] [flags] - Prints out a USB log\n");
  249. dprintf(" <log> - {USBHUB | USBD | UHCD | OpenHCI}\n");
  250. dprintf(" [addr] - address to begin dumping from in <log>\n");
  251. dprintf(" [-r] - reset the log to dump from most recent entry\n");
  252. dprintf(" [-s str] - search for first instance of a particular tag\n");
  253. dprintf(" from the current position; str should be a list\n");
  254. dprintf(" of tags delimited by comma's with no whitespace\n");
  255. dprintf(" [-l n] - set the number of lines to display at a time to n\n");
  256. dprintf("usbstruc <address> <type> - Print out an USB HC descriptor of <type>\n");
  257. dprintf(" <type> - {OHCIReg | HCCA | OHCIHcdED | OHCIHcdTD |\n"
  258. " OHCIEndpoint | DevData | UHCDReg }\n");
  259. dprintf("vad - Dumps VADs\n");
  260. dprintf("version - Version of extension dll\n");
  261. dprintf("vm - Dumps virtual management values\n");
  262. dprintf("vpb <address> - Dumps volume parameter block\n");
  263. dprintf("vtop DirBase address - Dumps physical page for virtual address\n");
  264. dprintf("wdmaud <address> <flags> - Dumps wdmaud data for structures\n");
  265. dprintf(" flags: 1 - Ioctl History Dump given WdmaIoctlHistoryListHead\n");
  266. dprintf(" flags: 2 - Pending Irps given WdmaPendingIrpListHead\n");
  267. dprintf(" flags: 4 - Allocated MDLs given WdmaAllocatedMdlListHead\n");
  268. dprintf(" flags: 8 - pContext Dump given WdmaContextListHead\n");
  269. dprintf(" flags:100 - Verbose\n");
  270. dprintf("zombies - Find all zombie processes\n");
  271. switch (TargetMachine)
  272. {
  273. case IMAGE_FILE_MACHINE_I386:
  274. dprintf("\n");
  275. dprintf("X86-specific:\n\n");
  276. dprintf("apic [base] - Dump local apic\n");
  277. dprintf("callback <address> [num] - Dump callback frames for specified thread\n");
  278. dprintf("cbreg <BaseAddr> | %%%%<PhyAddr> - Dump CardBus registers\n");
  279. dprintf("ioapic [base] - Dump io apic\n");
  280. dprintf("mps - Dumps MPS BIOS structures\n");
  281. dprintf("mtrr - Dumps MTTR\n");
  282. dprintf("npx [base] - Dumps NPX save area\n");
  283. dprintf("pcr - Dumps the PCR\n");
  284. dprintf("pciir - Dumps the Pci Irq Routing Table\n");
  285. dprintf("pic - Dumps PIC(8259) information\n");
  286. dprintf("sel [selector] - Examine selector values\n");
  287. dprintf("\n");
  288. break;
  289. case IMAGE_FILE_MACHINE_IA64:
  290. dprintf("\n");
  291. dprintf("IA64-specific:\n\n");
  292. dprintf("btb - Dump branch trace buffer for current processor\n");
  293. dprintf("bth <processor> - Dump branch trace history for target processor\n");
  294. dprintf("dcr <address> <dispmode> - Dump dsr register at specified address\n");
  295. dprintf("ih <processor> - Dump interrupt history for target processor\n");
  296. dprintf("ihs <processor> - Dump interrupt history for target processor with symbols\n");
  297. dprintf("isr <address> <dispmode> - Dump isr register at specified address\n");
  298. dprintf("pars <address> - Dump application registers file at specified address\n");
  299. dprintf("pcrs <address> - Dump control registers file at specified address\n");
  300. dprintf("pmc [-opt] <address> <dispmode> - Dump pmc register at specified address\n");
  301. dprintf("pmssa <address> - Dump minstate save area at specified address\n");
  302. dprintf("psp <address> <dispmode> - Dump psp register at specified address\n");
  303. dprintf("psr <address> <dispmode> - Dump psr register at specified address\n");
  304. break;
  305. default:
  306. break;
  307. }
  308. return S_OK;
  309. }