home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 545a.lha / HitMe / hitme.doc < prev    next >
Text File  |  1991-09-06  |  2KB  |  64 lines

  1. OK, here it is.  I finally got sick of looking up those
  2. enforcer hits the hard way.
  3.  
  4. I assume the following things:
  5.  
  6.    1. You have SAS/C
  7.  
  8.    2. SAS/C's OMD utility is in LC:OMD
  9.  
  10.    3. You have created a map file for your project using at least the 
  11.       MAP H <mapfilename> option on BLINK.
  12.  
  13. Given the above, when you get an enforcer hit that has hunk-o-matic
  14. output, you should be in business.
  15.  
  16. SYNTAX:
  17.  
  18.    hitme <options> <mapfilename> <offset> [<hunk>]
  19.  
  20.       <options> is one or more of
  21.          -n         Do not run OMD
  22.          -d         Keep OMD output
  23.          -d<file>   Keep OMD output in <file>
  24.          -t         Delete OMD output (default)
  25.          -t<file>   Use <file> for OMD output, then delete
  26.          -o<dir>    Directory for object files (default current directory)
  27.          -c<dir>    Directory for C source files (default current directory)
  28.  
  29.       <mapfilename> is a BLINK-produced map of your executable
  30.  
  31.       <offset>      is the offset reported by ENFORCER
  32.  
  33.       <hunk>        is the hunk reported by ENFORCER (default 0)
  34.  
  35.  
  36. The simplest invocation is
  37.  
  38.    hitme mapfile offset
  39.  
  40. This should work for most cases.  It assumes the .c and .o files are in the
  41. current directory, and the hit is in hunk 0.  If all this is true, hitme 
  42. will do the following:
  43.  
  44.    *) Read the "mapfile" to determine which C source file caused the hit.
  45.       (This is done by comparing the offset of the hit to the offset of
  46.       the start of each module as listed in the "HUNK" map listing.)
  47.  
  48.    *) Invoke LC:OMD on the object and source files to get a disassembly.
  49.       If this fails, provide the filename and offset relative to the 
  50.       start of the file and exit.
  51.  
  52.    *) If no debugging is available, provide the filename and offset relative
  53.       to the start of the file.
  54.  
  55.    *) If the object was compiled with debugging, read the OMD output and
  56.       provide the filename and line number that caused the hit.
  57.  
  58. The various options starting with a hyphen affect where the OMD output is 
  59. placed and whether it is kept around after the invocation of HITME.  You 
  60. can also specify the directory you keep your .c and/or .o files in if 
  61. different from the current directory.
  62.  
  63. Source is included in case there are bugs, but please contact me first if
  64. you want to modify and redistribute the code.