home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c082_122 / 6.ddi / DOC.ZIP / WINSPCTR.DOC < prev   
Encoding:
Text File  |  1992-06-10  |  30.8 KB  |  975 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6. CONTENTS
  7. ___________________________________________________________________________
  8.  
  9.  
  10.  
  11.  
  12.  
  13. Introduction . . . . . . . . . . . 1       Register section  . . . . . . 10
  14.   Getting started  . . . . . . . . 2       Message queue section . . . . 10
  15. Configuring WinSpector . . . . . . 2       Tasks section . . . . . . . . 10
  16.   Setting preferences  . . . . . . 3       Modules section . . . . . . . 11
  17.     Setting the log file                   USER and GDI heap
  18.     directory  . . . . . . . . . . 3       information . . . . . . . . . 11
  19.     Setting the log file viewer  . 3       System information section  . 11
  20.     Overwriting or appending to the    Processing WinSpector data  . . . 11
  21.     log file . . . . . . . . . . . 4     DFA output  . . . . . . . . . . 12
  22.     Writing system information to        Using DFA with WINSPCTR.LOG . . 12
  23.     the log file . . . . . . . . . 5     Using DFA with WINSPCTR.BIN . . 12
  24.     Sending an exception summary to      Syntax  . . . . . . . . . . . . 13
  25.     the debugging terminal . . . . 5   Other WinSpector tools  . . . . . 13
  26.     Writing stack frame data to the      Creating a .MAP file from an
  27.     log file . . . . . . . . . . . 6     executable  . . . . . . . . . . 14
  28.     Writing a postmortem dump to the       Syntax  . . . . . . . . . . . 14
  29.     log file . . . . . . . . . . . 7     Creating a .SYM file from a .MAP
  30.     Writing user comments to the log     file  . . . . . . . . . . . . . 14
  31.     file . . . . . . . . . . . . . 8       Syntax  . . . . . . . . . . . 14
  32. Using WinSpector when an exception         Notes . . . . . . . . . . . . 14
  33. occurs . . . . . . . . . . . . . . 8     Creating .SYM files from
  34.   WINSPCTR.BIN . . . . . . . . . . 9     executables . . . . . . . . . . 15
  35.   WINSPCTR.LOG . . . . . . . . . . 9       Syntax  . . . . . . . . . . . 16
  36.     Disassembly section  . . . . . 9       Tips  . . . . . . . . . . . . 16
  37.     Stack trace section  . . . . . 9
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.                                      i
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64. ===========================================================================
  65. Introduction
  66. ===========================================================================
  67.  
  68.                     WinSpector and its utilities help you perform a
  69.                     postmortem examination of Windows Unrecoverable
  70.                     Application Errors (UAEs).
  71.  
  72.                     How to use it:
  73.  
  74.                     1. Run WinSpector.
  75.  
  76.                     2. When a UAE (exception) occurs, WinSpector writes a
  77.                        log file to your disk.
  78.  
  79.                     3. A Windows "Unrecoverable Application Error" box is
  80.                        displayed.
  81.  
  82.                     4. Choose OK.
  83.  
  84.                     5. A WinSpector dialog box with a brief exception
  85.                        report is displayed.
  86.  
  87.                     6. Choose OK.
  88.  
  89.                     7. Read the log file. It contains information that can
  90.                        help you find the cause of the exception.
  91.  
  92.                     What it can show you:
  93.  
  94.                     o the call stack
  95.  
  96.                     o function and procedures names in the call stack (with
  97.                       a little help from you)
  98.  
  99.                     o CPU registers
  100.  
  101.                     o a disassembly of the instructions
  102.  
  103.                     o Windows information
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.    Getting started  =======================================================
  111.  
  112.  TOOLHELP.DLL is a  Before using WinSpector, be sure that TOOLHELP.DLL
  113.   Windows DLL that  (from Windows 3.1 or later) is in your search path. To
  114.  provides ways for  be safe, don't have other exception debugging tools
  115.   utilities to get  running concurrent with WinSpector (except Turbo
  116.     access to low-  Debugger).
  117.       level system
  118.       information.  The easiest way to use WinSpector is to put it in the
  119.    WinSpector uses  "load=" section of your WIN.INI file. Upon starting,
  120.    TOOLHELP.DLL to  WinSpector will minimize. No additional interaction is
  121.       know when an  required.
  122.   exception occurs
  123.  and to get at the
  124. system information
  125.   it writes to the
  126.          log file.
  127.  
  128.  
  129. ===========================================================================
  130. Configuring WinSpector
  131. ===========================================================================
  132.  
  133.                     WinSpector can be configured to suit your needs. Four
  134.                     options allow you to gather specific information. See
  135.                     the section "Setting preferences" for information on
  136.                     these options.
  137.  
  138.                     o Set System Information
  139.                     o Stack Frame Data
  140.                     o User Comments
  141.                     o PostMortem Dump
  142.  
  143.                     Three preprocessing utilities help you make .SYM files
  144.                     available prior to exception. WinSpector uses the .SYM
  145.                     files to greatly enhance the exception report. See the
  146.                     section "Other WinSpector tools" for information on
  147.                     these utilities.
  148.  
  149.                     o BUILDSYM
  150.                     o TMAPSYM
  151.                     o EXEMAP
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.                                    - 2 -
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.                     DFA, WinSpector's post-processing utility, can use
  169.                     Turbo Debugger symbolic information to further
  170.                     enhancing readability of available UAE information.
  171.  
  172.  
  173.            Setting  =======================================================
  174.        preferences
  175.                     WinSpector's options can be set either in the
  176.                     Preferences dialog box or by entering commands directly
  177.                     into the WINSPCTR.INI file. Both methods are discussed
  178.                     here.
  179.  
  180.  
  181. ------------------  The Directory option in the Preferences dialog box lets
  182.    Setting the log  you decide where the log file is written. If you do not
  183.     file directory  specify a directory, it defaults to the Windows
  184. ------------------  directory.
  185.  
  186.                     >> Specifying a directory -----------------------------
  187.  
  188.                     1. Open the Preferences dialog box.
  189.  
  190.                     2. Enter the directory name in the Directory input box.
  191.  
  192.                     3. Choose OK.
  193.  
  194.                     or
  195.  
  196.                     o Add LogDir=[directory] to the WINSPCTR.INI file.
  197.  
  198.  
  199. ------------------  The Viewer option in the Preferences dialog box is
  200.    Setting the log  where you specify what program to use for viewing the
  201.        file viewer  log file. If you do not specify a directory, it
  202. ------------------  defaults to the Windows Notepad.
  203.  
  204.                     If an exception has occurred during the current Windows
  205.                     session, choose View Log on the Latest UAE dialog box
  206.                     or the Preferences dialog box to see the log file. View
  207.                     Log runs the selected viewing program and passes the
  208.                     WINSPCTR.LOG file as a command line argument.
  209.  
  210.                     To view a previous log file, choose View Log file from
  211.                     the WinSpector system menu.
  212.  
  213.                     >> Specifying a viewer --------------------------------
  214.  
  215.                     1. Open the Preferences Dialog Box.
  216.  
  217.  
  218.  
  219.                                    - 3 -
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226.                     2. Enter the viewer in the Viewer text box.
  227.  
  228.                     3. Choose OK.
  229.  
  230.                     or
  231.  
  232.                     o Add LogViewer=[viewer name] to the WINSPCTR.INI file.
  233.  
  234.  
  235. ------------------  The Append New Reports and Overwrite Previous Reports
  236.     Overwriting or  options in the Preferences dialog box let you either
  237.   appending to the  append reports to the previous log file or overwrite
  238.           log file  the previous log file when a new report is generated.
  239. ------------------  The default setting is to overwrite the previous log
  240.                     file.
  241.  
  242.                     If you choose to overwrite the previous log file, the
  243.                     first time an exception occurs the previous log file is
  244.                     overwritten. Subsequent exceptions that occur during
  245.                     the same Windows session will be appended.
  246.  
  247.                     >> Appending reports to the previous log file ---------
  248.  
  249.                     1. Open the Preferences Dialog Box.
  250.  
  251.                     2. Set Log File to Append New Reports.
  252.  
  253.                     3. Choose OK.
  254.  
  255.                     or
  256.  
  257.                     o Add CreateNewLog=0 to the WINSPCTR.INI file.
  258.  
  259.                     >> Overwriting the previous log file ------------------
  260.  
  261.                     1. Open the Preferences Dialog Box.
  262.  
  263.                     2. Set Log File to Overwrite Previous Reports.
  264.  
  265.                     3. Choose OK.
  266.  
  267.                     or
  268.  
  269.                     o Add CreateNewLog=1 to the WINSPCTR.INI file.
  270.  
  271.  
  272.  
  273.  
  274.  
  275.  
  276.  
  277.                                    - 4 -
  278.  
  279.  
  280.  
  281.  
  282.  
  283.  
  284. ------------------  The System Information option in the Preferences dialog
  285.     Writing system  box lets you add the Task List, the Module List, and
  286. information to the  information about the USER and GDI heaps to the log
  287.           log file  file. The default is to include system information in
  288. ------------------  the report.
  289.  
  290.                     >> Including system information in the log file -------
  291.  
  292.                     1. Open the Preferences Dialog Box.
  293.  
  294.                     2. Under Report Information, check System Info.
  295.  
  296.                     3. Choose OK.
  297.  
  298.                     or
  299.  
  300.                     o Add ShowSystemInfo=1 to the WINSPCTR.INI file.
  301.  
  302.                     >> Omitting system information from the log file ------
  303.  
  304.                     1. Open the Preferences Dialog Box.
  305.  
  306.                     2. Under Report Information, uncheck System Info.
  307.  
  308.                     3. Choose OK.
  309.  
  310.                     or
  311.  
  312.                     o Add ShowSystemInfo=0 to the WINSPCTR.INI file.
  313.  
  314.  
  315. ------------------  The AUX Summary option in the Preferences dialog box
  316.         Sending an  tells WinSpector to write an abbreviated form of the
  317.  exception summary  report to the AUX device, in addition to writing the
  318.   to the debugging  complete log file. To use this option, you need a
  319.           terminal  terminal connected to AUX or a device driver that
  320. ------------------  redirects AUX to a second monitor. The default is no
  321.                     output to AUX.
  322.  
  323.                     >> Sending a summary to AUX ---------------------------
  324.  
  325.                     1. Open the Preferences Dialog Box.
  326.  
  327.                     2. Under Report Information, check Summary To AUX.
  328.  
  329.                     3. Choose OK.
  330.  
  331.  
  332.  
  333.  
  334.  
  335.                                    - 5 -
  336.  
  337.  
  338.  
  339.  
  340.  
  341.  
  342.                     or
  343.  
  344.                     o Add LogToStdAux=1 to the WINSPCTR.INI file.
  345.  
  346.                     >> Not sending a summary to AUX -----------------------
  347.  
  348.                     1. Open the Preferences Dialog Box.
  349.  
  350.                     2. Under Report Information, uncheck Summary To AUX.
  351.  
  352.                     3. Choose OK.
  353.  
  354.                     or
  355.  
  356.                     o Add LogToStdAux=0 to the WINSPCTR.INI file.
  357.  
  358.  
  359. ------------------  The Stack Frame Data option in the Preferences dialog
  360.      Writing stack  box lets you add a verbose stack trace display to the
  361.  frame data to the  log file. For each stack frame that doesn't exceed 256
  362.           log file  bytes, a hex dump is performed, starting at the SS:BP
  363. ------------------  for that frame. If there are more than 256 bytes
  364.                     between 2 successive stack frames, the memory display
  365.                     is omitted for that frame. This data can be used to get
  366.                     the values of parameters that were passed to the
  367.                     function. The default is to not generate a verbose
  368.                     stack trace.
  369.  
  370.  
  371.                     It is usually easier to let the DFA utility do the hard
  372.                     work of figuring out what your parameters are. However,
  373.                     for those cases where you do not have Turbo Debugger
  374.                     information available, a verbose trace may be helpful.
  375.  
  376.                     >> Adding stack frame data to the log file ------------
  377.  
  378.                     1. Open the Preferences Dialog Box.
  379.  
  380.                     2. Under Report Information, check Stack Frame Data.
  381.  
  382.                     3. Choose OK.
  383.  
  384.                     or
  385.  
  386.                     o Add ShowStackInfo=1 to the WINSPCTR.INI file.
  387.  
  388.                     >> Omitting stack frame data from the log file --------
  389.  
  390.  
  391.  
  392.  
  393.                                    - 6 -
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.                     1. Open the Preferences Dialog Box.
  401.  
  402.                     2. Under Report Information, uncheck Stack Frame Data.
  403.  
  404.                     3. Choose OK.
  405.  
  406.                     or
  407.  
  408.                     o Add ShowStackInfo=0 to the WINSPCTR.INI file.
  409.  
  410.  
  411. ------------------  The PostMortem Dump option in the Preferences dialog
  412.          Writing a  box generates a WINSPCTR.BIN file.
  413. postmortem dump to
  414.       the log file  The DFA utility takes a WINSPCTR.BIN file and Turbo
  415. ------------------  Debugger information (.TDS files) and translates the
  416.                     raw binary data into a useful form. It generates a file
  417.                     that contains stack trace similar to the one in the log
  418.                     file, but with function names and line numbers, as well
  419.                     as local and global variables.
  420.  
  421.                     >> Generating a WINSPCTR.BIN file ---------------------
  422.  
  423.                     1. Open the Preferences Dialog Box.
  424.  
  425.                     2. Under Report Information check PostMortem Dump.
  426.  
  427.                     3. Choose OK.
  428.  
  429.                     or
  430.  
  431.                     o Add PostMortemDump=1 to the WINSPCTR.INI file.
  432.  
  433.                     >> Not generating a WINSPCTR.BIN file -----------------
  434.  
  435.                     1. Open the Preferences Dialog Box.
  436.  
  437.                     2. Under Report Information, uncheck PostMortem Dump
  438.  
  439.                     3. Choose OK.
  440.  
  441.                     or
  442.  
  443.                     o Add PostMortemDump=0 to the WINSPCTR.INI file.
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450.  
  451.                                    - 7 -
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458. ------------------  The User Comments option in the Preferences dialog box
  459.       Writing user  lets you enter information about what was happening at
  460.    comments to the  the time of the exception. A dialog box is displayed
  461.           log file  immediately after the exception log is written and
  462. ------------------  comments about what was happening can be entered at
  463.                     that time. Your comments are then appended to the log
  464.                     file.
  465.  
  466.                     >> Adding user comments to the log file ---------------
  467.  
  468.                     1. Open the Preferences Dialog Box.
  469.  
  470.                     2. Under Report Information, check User Comments.
  471.  
  472.                     3. Choose OK.
  473.  
  474.                     or
  475.  
  476.                     o Add ShowUserInfo=1 to the WINSPCTR.INI file.
  477.  
  478.                     >> Omitting user comments from the log file -----------
  479.  
  480.                     1. Open the Preferences Dialog Box.
  481.  
  482.                     2. Under Report Information, uncheck User Comments.
  483.  
  484.                     3. Choose OK.
  485.  
  486.                     or
  487.  
  488.                     o Add ShowUserInfo=0 to the WINSPCTR.INI file.
  489.  
  490.  
  491.  
  492. ===========================================================================
  493. Using WinSpector when an exception occurs
  494. ===========================================================================
  495.  
  496.                     When you get a UAE (in Windows 3.0) or a fault (in
  497.                     Windows 3.1), WinSpector goes to work, writing the
  498.                     information you've requested to files. The log file
  499.                     WINSPCTR.LOG is a text file you can read but
  500.                     WINSPCTR.BIN is a binary file that the DFA utility
  501.                     analyzes.
  502.  
  503.  
  504.  
  505.  
  506.  
  507.  
  508.  
  509.                                    - 8 -
  510.  
  511.  
  512.  
  513.  
  514.  
  515.  
  516.       WINSPCTR.BIN  =======================================================
  517.  
  518.                     See the section "Other WinSpector tools" for details
  519.                     about WINSPCTR.BIN.
  520.  
  521.  
  522.       WINSPCTR.LOG  =======================================================
  523.  
  524.                     The first line of the report(s) in WINSPCTR.LOG gives
  525.                     the date and time when the exception occurred. The
  526.                     second line lists
  527.  
  528.                     o what type of exception occurred
  529.                     o the module name
  530.                     o the logical address
  531.                     o the physical address
  532.                     o the current task at time of exception.
  533.  
  534.                     If the stack pointer is too small at time of exception,
  535.                     TOOLHELP.DLL automatically switches the stack. When
  536.                     this happens, the message "Stack Switched" is appended
  537.                     to the end of the second line of the log.
  538.  
  539.  
  540. ------------------  The first line of the disassembly section in the log
  541.        Disassembly  file identifies the assembly language instruction that
  542.            section  caused the exception.
  543. ------------------
  544.                     This is followed by the next few instructions in the
  545.                     program. These subsequent commands are listed to
  546.                     provide a point of reference for finding the task that
  547.                     caused the exception.
  548.  
  549.  
  550. ------------------  The first line of the stack trace section of the log
  551.        Stack trace  identifies the function or procedure that was executing
  552.            section  at the time of the exception. Stack Trace information
  553. ------------------  includes:
  554.  
  555.                     o frame number
  556.  
  557.                     o module name
  558.  
  559.                     o the name of the closest function before the address
  560.                       of the one that caused the exception, plus a number
  561.                       indicating how far away you were from that function
  562.  
  563.  
  564.  
  565.  
  566.  
  567.                                    - 9 -
  568.  
  569.  
  570.  
  571.  
  572.  
  573.  
  574.                       (this information is present only if a .SYM file is
  575.                       present)
  576.  
  577.                     o logical and physical address for the stack frame
  578.  
  579.                     o where your program comes back to after the call.
  580.  
  581.                     When WinSpector gives function names, it looks in the
  582.                     .SYM file for the closest symbol name that appears
  583.                     before the address in the call stack. Some .SYM files
  584.                     do not contain information for all functions. Thus, the
  585.                     function name appearing in the log file will be that of
  586.                     the closest function in the .SYM file with an address
  587.                     preceding the frame address. If the offset field
  588.                     appears to be too high, function names are suspect.
  589.  
  590.  
  591. ------------------  The register section of the log file gives the values
  592.   Register section  that are in the standard registers at the time of
  593. ------------------  exception. Limits and access rights are given for the
  594.                     CS, DS, ES, and SS registers.
  595.  
  596.  
  597. ------------------  The message queue section of the log file gives the
  598.      Message queue  last message actually received in the middle of
  599.            section  processing. Also given is a list of any messages that
  600. ------------------  were waiting in the queue at the time of exception.
  601.                     Listed is the following information.
  602.  
  603.                     o window handle (identifies what window)
  604.                     o message ID number (identifies what it was)
  605.                     o two parameters (present for any given window)
  606.  
  607.                     What is recorded in the message queue section may not
  608.                     really be the last message the program received.
  609.                     Windows may bypass the message queue (using the
  610.                     SendMessage function, for example). Keep that in mind
  611.                     when using message queue information.
  612.  
  613.  
  614. ------------------  The tasks section of the log file lists all programs
  615.      Tasks section  running in the system at the time of exception. Given
  616. ------------------  is:
  617.  
  618.                     o complete path for executor file
  619.                     o module name
  620.                     o windows module handle
  621.                     o task handle
  622.  
  623.  
  624.  
  625.                                   - 10 -
  626.  
  627.  
  628.  
  629.  
  630.  
  631.  
  632.                     o what the data segment value was for the task (the
  633.                       instance handle)
  634.  
  635.  
  636. ------------------  The Modules section of the log lists the modules that
  637.    Modules section  were running at time of exception. Given is:
  638. ------------------
  639.                     o path for executor file
  640.                     o the date
  641.                     o the file size
  642.                     o module name
  643.                     o module handle
  644.                     o reference count (how many times the module is in
  645.                       use).
  646.  
  647.  
  648. ------------------  The USER and GDI heap information section of the log
  649.  USER and GDI heap  shows what percentage of the USER and GDI heaps was
  650.        information  available at the time of exception.
  651. ------------------
  652.  
  653. ------------------  The System Information section of the log file shows
  654. System information  the mode and
  655.            section  windows version under which your program was run. Also
  656. ------------------  given is:
  657.  
  658.                     o CPU information
  659.                     o largest free memory block
  660.                     o total linear memory space
  661.                     o free linear memory space
  662.                     o swap file pages
  663.  
  664.  
  665.  
  666. ===========================================================================
  667. Processing WinSpector data
  668. ===========================================================================
  669.  
  670.                     The DFA utility post processes Turbo Debugger
  671.                     information gathered by WinSpector at the time of
  672.                     exception. WinSpector writes a WINSPCTR.BIN file at the
  673.                     time of exception if report information is set to
  674.                     PostMortem Dump. DFA can then be used to translate the
  675.                     WINSPCTR.BIN file into a useful format.
  676.  
  677.  
  678.  
  679.  
  680.  
  681.  
  682.  
  683.                                   - 11 -
  684.  
  685.  
  686.  
  687.  
  688.  
  689.  
  690.         DFA output  =======================================================
  691.  
  692.                     The DFA utility writes a file only if Turbo Debugger
  693.                     information exists for the file in the stack frame. The
  694.                     DFA output file (DFA.OUT) has a stack trace similar to
  695.                     the one in the WinSpector log file, except that it has:
  696.  
  697.                     o function names
  698.                     o line numbers
  699.                     o local and global variables
  700.                     o data segments and their values (including the stack
  701.                       segment).
  702.  
  703.                     Only one WINSPCTR.BIN file is written per Windows
  704.                     session, so post-process files promptly. You may then
  705.                     want to rename or delete the DFA.OUT and WINSPCTR.LOG
  706.                     files, to allow for more than one exception in a
  707.                     session.
  708.  
  709.     Using DFA with  =======================================================
  710.       WINSPCTR.LOG
  711.                     When used with the WINSPCTR.LOG file alone, DFA gives
  712.                     minimal stack trace information such as addresses.
  713.                     Source filenames and line numbers are added to the
  714.                     report when Turbo Debugger information (a .TDS file) is
  715.                     present either in the executable file or in a separate
  716.                     file.
  717.  
  718.  
  719.     Using DFA with  =======================================================
  720.       WINSPCTR.BIN
  721.                     When used with the WINSPCTR.BIN file, DFA makes
  722.                     additional information available:
  723.  
  724.                     o Stack based variables are added to the log, including
  725.                       structures and arrays.
  726.  
  727.                     o Variable types, values, and addresses are listed by
  728.                       function.
  729.  
  730.  
  731.                     If a Turbo Debugger .TDS file is present, for each
  732.                     stack frame, DFA reports:
  733.  
  734.                     o Section one
  735.  
  736.                       - source file
  737.  
  738.  
  739.  
  740.  
  741.                                   - 12 -
  742.  
  743.  
  744.  
  745.  
  746.  
  747.  
  748.                       - line number
  749.                       - local variables
  750.                       - parameters.
  751.  
  752.                     o Section two
  753.  
  754.                       - module name for the task with the fault
  755.                       - filenames
  756.                       - logical segments
  757.                       - their selectors
  758.                       - whether it's data or code.
  759.  
  760.                     o Section three
  761.  
  762.                       - global variables
  763.                       - static variables
  764.                       - their values at time of exception.
  765.  
  766.             Syntax  =======================================================
  767.  
  768.                     DFA [option] WINSPCTR.LOG [WINSPCTR.BIN]
  769.  
  770.                     The WINSPCTR.LOG file is required. With it, you get
  771.                     source file and line numbers. With WINSPCTR.BIN
  772.                     (optional), you get variable information.
  773.  
  774.                         /O[outputfile]
  775.                         Renames the output file from the DFA.OUT default
  776.  
  777.                         /D
  778.                         Forces DFA to write out a hex dump of the saved
  779.                     data segments
  780.  
  781.  
  782.  
  783. ===========================================================================
  784. Other WinSpector tools
  785. ===========================================================================
  786.  
  787.                     EXEMAP, TMAPSYM, and BUILDSYM are three utilities that
  788.                     can enhance the information WinSpector provides about
  789.                     an exception.
  790.  
  791.  
  792.  
  793.  
  794.  
  795.  
  796.  
  797.  
  798.  
  799.                                   - 13 -
  800.  
  801.  
  802.  
  803.  
  804.  
  805.  
  806.    Creating a .MAP  =======================================================
  807.       file from an
  808.         executable  EXEMAP creates .MAP files for Windows executables. A
  809.                     .MAP file can be used to create a .SYM file, which can
  810.                     then be used by WinSpector to enhance the error
  811.                     reporting. This can be especially useful for use with
  812.                     .DLLs or other programs that you don't have source code
  813.                     for.
  814.  
  815.                     Although the resulting .MAP file isn't as complete as
  816.                     one generated by the linker, it does include addresses
  817.                     for exported public functions.
  818.  
  819.  
  820. ------------------  EXEMAP exefilename [output mapfile]
  821.             Syntax
  822. ------------------  If [output mapfile] is not given, it defaults to
  823.                     exefilename.MAP.
  824.  
  825.  
  826.    Creating a .SYM  =======================================================
  827.   file from a .MAP
  828.               file  TMAPSYM creates .SYM files from existing .MAP files
  829.                     (created either by TLINK or by the EXEMAP utility). The
  830.                     resulting .SYM files make public functions, variable
  831.                     names, and functions in the entry table of the
  832.                     executable available to WinSpector. Constants and line
  833.                     number information is not included in a TMAPSYM
  834.                     generated .SYM file.
  835.  
  836. ------------------  TMAPSYM filename[.MAP]
  837.             Syntax
  838. ------------------  The .MAP extension is optional.
  839.  
  840.  
  841. ------------------  Borland C++ precompiled header files use a .SYM
  842.              Notes  extension and could be inadvertently overwritten when
  843. ------------------  generating a .SYM (symbol) file. If you are using the
  844.                     command line compiler, there is an option to rename the
  845.                     header file so that there is no naming conflict.
  846.  
  847.                     BUILDSYM overwrites any existing .SYM file. To be safe,
  848.                     copy
  849.                     existing .SYM files before using BUILDSYM or TMAPSYM.
  850.  
  851.  
  852.  
  853.  
  854.  
  855.  
  856.  
  857.                                   - 14 -
  858.  
  859.  
  860.  
  861.  
  862.  
  863.  
  864.      Creating .SYM  =======================================================
  865.         files from
  866.        executables  The BUILDSYM utility offers a convenient way to create
  867.                     .SYM files for one or more executable programs in a
  868.                     directory.
  869.  
  870.                     When .SYM files are not available, creating them
  871.                     without BUILDSYM is a two step process:
  872.  
  873.                     1. Use the EXEMAP utility on the program to make a .MAP
  874.                        file
  875.  
  876.                     2. Use the TMAPSYM utility on the .MAP file to make a
  877.                        .SYM file
  878.  
  879.                     BUILDSYM uses EXEMAP and TMAPSYM, but you enter only
  880.                     one command to complete the process. BUILDSYM also
  881.                     erases .MAP files from your directory after .SYM files
  882.                     are created. BUILDSYM's support for wild cards in the
  883.                     syntax lets you create .SYM files for part or all of a
  884.                     directory by entering a single command.
  885.  
  886.                     BUILDSYM requires that EXEMAP and TMAPSYM utilities be
  887.                     in your search path. Resulting .SYM files are placed in
  888.                     the current directory. For WinSpector to find a .SYM
  889.                     file, it must be in the same directory as the
  890.                     executable where the exception occurred.
  891.  
  892.                     BUILDSYM:
  893.  
  894.                     o verifies that the files are really Windows files (if
  895.                       they're not, BUILDSYM leaves them alone)
  896.  
  897.                     o calls EXEMAP to create .MAP files
  898.  
  899.                     o verifies that .MAP files were created
  900.  
  901.                     o calls TMAPSYM, passing the names of the new .MAP
  902.                       files, to create .SYM files
  903.  
  904.                     o deletes the .MAP files (which are no longer needed)
  905.  
  906.  
  907.  
  908.  
  909.  
  910.  
  911.  
  912.  
  913.  
  914.  
  915.                                   - 15 -
  916.  
  917.  
  918.  
  919.  
  920.  
  921.  
  922. ------------------  BUILDSYM filename
  923.             Syntax
  924. ------------------  DOS wildcards are supported in the filename portion of
  925.                     the syntax.
  926.  
  927.  
  928. ------------------  Borland precompiled header files use a .SYM extension
  929.               Tips  and could be inadvertently overwritten when generating
  930. ------------------  a .SYM file. If you are using the command line
  931.                     compiler, there is an option to rename the header file
  932.                     so that there is no naming conflict.
  933.  
  934.                     BUILDSYM overwrites any existing .SYM file. To be safe,
  935.                     copy existing .SYM files before using BUILDSYM or
  936.                     TMAPSYM.
  937.  
  938.  
  939.  
  940.  
  941.  
  942.  
  943.  
  944.  
  945.  
  946.  
  947.  
  948.  
  949.  
  950.  
  951.  
  952.  
  953.  
  954.  
  955.  
  956.  
  957.  
  958.  
  959.  
  960.  
  961.  
  962.  
  963.  
  964.  
  965.  
  966.  
  967.  
  968.  
  969.  
  970.  
  971.  
  972.  
  973.                                   - 16 -
  974.  
  975.