home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / sdk / winbase / debug / wdbgexts / readme.txt < prev    next >
Text File  |  1996-01-25  |  2KB  |  52 lines

  1. Creating a WinDbg Extension
  2.  
  3.  
  4. SUMMARY
  5. =======
  6.  
  7. The WDBGEXTS sample demonstrates how to create an extention for the WinDbg
  8. debugger. This is a port of the sample demonstrating how to create an NTSD
  9. extension.
  10.  
  11. Extensions are DLL entry points. The arguments passed to an extension are:
  12.  
  13.     HANDLE hCurrentProcess - Supplies a handle to the current process (at
  14.         the time the extension is called).
  15.  
  16.     HANDLE hCurrentThread - Supplies a handle to the current thread (at
  17.         the time the extension is called).
  18.  
  19.     DWORD CurrentPc - Supplies the current pc at the time the extension is
  20.         called.
  21.  
  22.     PWINDBG_EXTENSION_APIS lpExtensionApis - Supplies the address of the
  23.         functions callable by this extension.
  24.  
  25.     LPSTR lpArgumentString - Supplies the command-line arguments for the
  26.         extension.
  27.  
  28. The type PWINDBG_EXTENSION_APIS is defined in \mstools\h\wdbgexts.h.
  29.  
  30. Note that in the makefile the -Gz compiler option is specified to ensure
  31. that __stdcall is used.
  32.  
  33. MORE INFORMATION
  34. ================
  35.  
  36. The following is a description of the exported functions.
  37.  
  38. Function   Description
  39.  
  40. igrep      Searches the instruction stream for a pattern.
  41. str        Given a pointer to a string, it prints out the string, its 
  42.            length, and its location in memory.
  43.  
  44. To use the commands contained in WDBGEXTS.DLL, make sure that the DLL is
  45. placed in a directory which is on the PATH.
  46.  
  47. The syntax for the commands is as follows:
  48.  
  49.     !wdbgexts.igrep [pattern [expression] ]
  50.  
  51.     !wdbgexts.str [string]
  52.