home *** CD-ROM | disk | FTP | other *** search
- OK, here it is. I finally got sick of looking up those
- enforcer hits the hard way.
-
- I assume the following things:
-
- 1. You have SAS/C
-
- 2. SAS/C's OMD utility is in LC:OMD
-
- 3. You have created a map file for your project using at least the
- MAP H <mapfilename> option on BLINK.
-
- Given the above, when you get an enforcer hit that has hunk-o-matic
- output, you should be in business.
-
- SYNTAX:
-
- hitme <options> <mapfilename> <offset> [<hunk>]
-
- <options> is one or more of
- -n Do not run OMD
- -d Keep OMD output
- -d<file> Keep OMD output in <file>
- -t Delete OMD output (default)
- -t<file> Use <file> for OMD output, then delete
- -o<dir> Directory for object files (default current directory)
- -c<dir> Directory for C source files (default current directory)
-
- <mapfilename> is a BLINK-produced map of your executable
-
- <offset> is the offset reported by ENFORCER
-
- <hunk> is the hunk reported by ENFORCER (default 0)
-
-
- The simplest invocation is
-
- hitme mapfile offset
-
- This should work for most cases. It assumes the .c and .o files are in the
- current directory, and the hit is in hunk 0. If all this is true, hitme
- will do the following:
-
- *) Read the "mapfile" to determine which C source file caused the hit.
- (This is done by comparing the offset of the hit to the offset of
- the start of each module as listed in the "HUNK" map listing.)
-
- *) Invoke LC:OMD on the object and source files to get a disassembly.
- If this fails, provide the filename and offset relative to the
- start of the file and exit.
-
- *) If no debugging is available, provide the filename and offset relative
- to the start of the file.
-
- *) If the object was compiled with debugging, read the OMD output and
- provide the filename and line number that caused the hit.
-
- The various options starting with a hyphen affect where the OMD output is
- placed and whether it is kept around after the invocation of HITME. You
- can also specify the directory you keep your .c and/or .o files in if
- different from the current directory.
-
- Source is included in case there are bugs, but please contact me first if
- you want to modify and redistribute the code.