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.

208 lines
8.6 KiB

  1. /*++
  2. Copyright (c) 1991 Microsoft Corporation
  3. Module Name:
  4. help.c
  5. Abstract:
  6. This module dumps out help info for VDMEXTS
  7. Author:
  8. Neil Sandlin (NeilSa) 15-Jan-1996
  9. Notes:
  10. Revision History:
  11. --*/
  12. #include <precomp.h>
  13. #pragma hdrstop
  14. CHAR szAPIUSAGE[] = "Usage: !vdmexts.APIProfDmp [TblName] [APIspec]\n\n where: TblName = kernel | user | gdi | keyboard | sound | shell | mmed\n (no TblName implies 'all tables')\n\n APIspec = API # or API name";
  15. CHAR szMSGUSAGE[] = "Usage: !vdmexts.MsgProfDmp [MessageName | MessageNum (decimal)]\n (no argument implies 'all messages')";
  16. VOID
  17. helpAPIProfDmp(
  18. VOID
  19. )
  20. {
  21. PRINTF("\n\n%s\n", szAPIUSAGE);
  22. }
  23. VOID
  24. helpMsgProfDmp(
  25. VOID
  26. )
  27. {
  28. PRINTF("\n\n%s\n", szMSGUSAGE);
  29. }
  30. VOID
  31. helpFilter(
  32. VOID
  33. )
  34. {
  35. PRINTF("Usage: filter <option> <arg>\n\n");
  36. PRINTF(" where <option>=\n");
  37. PRINTF("<none> - Dump current state\n");
  38. PRINTF("* - Disables logging on all API classes\n");
  39. PRINTF("Reset - Filter is reset to default state\n");
  40. PRINTF("CallId xxxx - Adds api with given callid to list to be filtered\n");
  41. PRINTF("Task xxxx - Filter on a Specific TaskID\n");
  42. PRINTF("Verbose - Toggles Verbose Mode On/Off\n");
  43. PRINTF("Commdlg - Toggles Filtering of Commdlg Calls On/Off\n");
  44. PRINTF("GDI - Toggles Filtering of GDI Calls On/Off\n");
  45. PRINTF("Kernel - Toggles Filtering of Kernel Calls On/Off\n");
  46. PRINTF("Kernel16 - Toggles Filtering of Kernel16 Calls On/Off\n");
  47. PRINTF("Keyboard - Toggles Filtering of Keyboard Calls On/Off\n");
  48. PRINTF("MMedia - Toggles Filtering of MMedia Calls On/Off\n");
  49. PRINTF("Sound - Toggles Filtering of Sound Calls On/Off\n");
  50. PRINTF("User - Toggles Filtering of User Calls On/Off\n");
  51. PRINTF("Winsock - Toggles Filtering of Winsock Calls On/Off\n");
  52. PRINTF("\n");
  53. }
  54. VOID
  55. help_denv(
  56. VOID
  57. )
  58. {
  59. PRINTF("Dump environment block for current DOS process or given environment selector\n");
  60. PRINTF("\n");
  61. PRINTF("!denv <bPMode> <segEnv>\n");
  62. PRINTF("\n");
  63. PRINTF("Examples:\n");
  64. PRINTF("!denv - Dumps environment for current DOS process\n");
  65. PRINTF("!denv 0 145d - Dumps environment at &145d:0 (145d from PDB_environ of DOS process)\n");
  66. PRINTF("!denv 1 16b7 - Dumps environment at #16b7:0 (16b7 from !dt -v segEnvironment)\n");
  67. PRINTF("\n");
  68. }
  69. extern char *w32DotCommandExtHelp[];
  70. VOID
  71. help_k32(
  72. VOID
  73. )
  74. {
  75. char **s;
  76. PRINTF("MEKRNL32 debug commands\n");
  77. PRINTF("\n");
  78. for (s = w32DotCommandExtHelp; *s; ++s) {
  79. PRINTF(*s);
  80. }
  81. }
  82. VOID
  83. help(
  84. CMD_ARGLIST
  85. ) {
  86. CMD_INIT();
  87. if (GetNextToken()) {
  88. if (_strnicmp(lpArgumentString, "filter", 6) == 0) {
  89. helpFilter();
  90. } else if (_strnicmp(lpArgumentString, "apiprofdmp", 10) == 0) {
  91. helpAPIProfDmp();
  92. } else if (_strnicmp(lpArgumentString, "msgprofdmp", 10) == 0) {
  93. helpMsgProfDmp();
  94. } else if (_strnicmp(lpArgumentString, "denv", 4) == 0) {
  95. help_denv();
  96. } else if (_strnicmp(lpArgumentString, "k32", 3) == 0) {
  97. help_k32();
  98. } else {
  99. PRINTF("No specific help information available for '%s'\n", lpArgumentString);
  100. }
  101. return;
  102. }
  103. if (!EXPRESSION("ntvdm!Ldt")) {
  104. PRINTF("\nWARNING: Symbols for NTVDM are not available.\n\n");
  105. }
  106. if (!EXPRESSION("wow32!gptdTaskHead")) {
  107. PRINTF("\nWOW commands are not currently available.\n\n");
  108. } else if (!EXPRESSION("wow32!iLogLevel")) {
  109. PRINTF("\nWOW32 is the free version: Some commands will be unavailable.\n\n");
  110. }
  111. PRINTF("------------- VDMEXTS Debug Extension help:--------------\n\n");
  112. PRINTF("help [cmd] - Displays this list or gives details on command\n");
  113. PRINTF("ApiProfClr - Clears the api profiling table\n");
  114. PRINTF("ApiProfDmp [options] - Dumps the api profiling table\n");
  115. PRINTF("at 0xXXXX - shows name associated with hex atom #\n");
  116. PRINTF("bp <addr> - Sets a vdm breakpoint\n");
  117. PRINTF("bd/be <n> - Disables/enables vdm breakpoint 'n'\n");
  118. PRINTF("bl - Lists vdm breakpoints\n");
  119. PRINTF("chkheap - Checks WOW kernel's global heap\n");
  120. PRINTF("cia - Dump cursor/icon alias list\n");
  121. PRINTF("d<b|w|d> <addr> [len] - Dump vdm memory\n");
  122. PRINTF("ddemem - Dump dde memory thunks\n");
  123. PRINTF("ddte <addr> - Dump dispatch table entry pointed to by <addr>\n");
  124. PRINTF("denv <bProt> <selEnv> - Dump environment for current task or given selector/segment\n");
  125. PRINTF("df [vector] - Dump protect mode fault handler address\n");
  126. PRINTF("dfh [fh [pdb]] - Dump DOS file handles for current or given PDB\n");
  127. PRINTF("dg <sel> - Dump info on a selector\n");
  128. PRINTF("ddh [seg] - Dump DOS heap chain starting at <seg>:0000\n");
  129. PRINTF("dgh [sel|ownersel] - Dump WOW kernel's global heap\n");
  130. PRINTF("dhdib [@<address>] - Dump dib.drv support structures (DIBINFO)\n");
  131. PRINTF("di [vector] - Dump protect mode interrupt handler address\n");
  132. PRINTF("dma - Dump virtual DMA state\n");
  133. PRINTF("dpd - Dump DPMI DOS memory allocations\n");
  134. PRINTF("dpx - Dump DPMI extended memory allocations\n");
  135. PRINTF("dsft [sft] - Dump all or specified DOS system file tables\n");
  136. PRINTF("dt [-v] <addr> - Dump WOW Task Info\n");
  137. PRINTF("dwp <addr> - Dump WOWPORT structure pointed to by <addr>\n");
  138. PRINTF("e<b|w|d> <addr> <data> - Edit vdm memory\n");
  139. PRINTF("filter [options] - Manipulate logging filter\n");
  140. PRINTF("fs <text to find> - Find text in 16:16 memory (case insensitive)\n");
  141. PRINTF("glock <sel> - Increments the lock count on a moveable segment\n");
  142. PRINTF("gmem - Dumps Global/heap memory alloc'd by wow32\n");
  143. PRINTF("gunlock <sel> - Decrements the lock count on a moveable segment\n");
  144. PRINTF("hgdi <h16> - Returns 32-bit GDI handle for <h16>\n");
  145. PRINTF("ica - Dump Interrupt Controller state\n");
  146. PRINTF("k - Stack trace\n");
  147. PRINTF("k32 - MEKRNL32 special commands\n");
  148. PRINTF("kb - Stack trace with symbols\n");
  149. PRINTF("LastLog - Dumps Last Logged WOW APIs from Circular Buffer\n");
  150. PRINTF("lg [#num] [count] - Dumps NTVDM history log\n");
  151. PRINTF("lgr [#num] [count] - Dumps NTVDM history log (with regs)\n");
  152. PRINTF("lgt [1|2|3] - Sets NTVDM history log timer resolution\n");
  153. PRINTF("lm <sel|modname> - List loaded modules\n");
  154. PRINTF("ln [addr] - Determine near symbols\n");
  155. PRINTF("LogFile [path] - Create/close toggle for iloglevel capture to file\n");
  156. PRINTF(" (path defaults to c:\\ilog.log)\n");
  157. PRINTF("MsgProfClr - Clears the msg profiling table\n");
  158. PRINTF("MsgProfDmp [options] - Dumps the msg profiling table\n");
  159. PRINTF("ntsd - Gets an NTSD prompt from the VDM prompt\n");
  160. PRINTF("r - Dump registers\n");
  161. PRINTF("rmcb - Dumps dpmi real mode callbacks\n");
  162. PRINTF("SetLogLevel xx - Sets the WOW Logging Level\n");
  163. PRINTF("StepTrace - Toggles Single Step Tracing On/Off\n");
  164. PRINTF("sx - Displays debugging options\n");
  165. PRINTF("sx<d|e> <flag> - Disables/enables debugging options\n");
  166. PRINTF("u [addr] [len] - Unassemble vdm code with symbols\n");
  167. PRINTF("wc <hwnd16> - Dumps the window class structure of <hwnd16>\n");
  168. PRINTF("ww <hwnd16> - Dumps the window structure of <hwnd16>\n");
  169. PRINTF("x <symbol> - Get symbol's value\n");
  170. #ifdef i386
  171. PRINTF("\n-------------- i386 specific commands\n");
  172. PRINTF("fpu - Dump 487 state\n");
  173. PRINTF("pdump - Dumps profile info to file \\profile.out\n");
  174. PRINTF("pint - Sets the profile interval\n");
  175. PRINTF("pstart - Causes profiling to start\n");
  176. PRINTF("pstop - Causes profiling to stop\n");
  177. PRINTF("vdmtib [addr] - Dumps the register context in the vdmtib\n");
  178. #endif
  179. PRINTF("\n\n");
  180. PRINTF(" where [options] can be displayed with 'help <cmd>'\n\n");
  181. }