home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 18
/
aminetcdnumber181997.iso
/
Aminet
/
dev
/
e
/
efindhit.readme
< prev
next >
Wrap
Text File
|
1997-03-02
|
3KB
|
62 lines
Short: EFindHit 1.0 (for Enforcer output)
Author: jason@fsel.com (Jason R. Hulance)
Type: dev/e
EFindHit can be used to find the line number of an Enforcer hit in an
E program, given the offset information that Enforcer produces.
Unlike normal FindHit programs, EFindHit reports the line numbers of
hits in E modules, too (i.e., not just the main program).
To use EFindHit, the main source file *must* be compiled with the
LINEDEBUG or DEBUG switches. And if you want to track hits in modules
used by the program, they too must be compiled with one of these
switches. The one limitation is that hits in E built-in functions
will be reported by Enforcer as being the fault of the program, but
EFindHit will report them as coming from the last line of one of the
sources. (As a help, EFindHit will flag those offsets that appear to
be too far beyond the last line, and warn you that they may be in E
built-in functions.)
EFindHit takes the following arguments:
EXECUTABLE/A,OFFSETS/A/M
So, you can supply a list of offsets. Hexadecimal offsets can be
specified using a leading '$' or '0x'. Without these prefixes the
offset is interpreted as decimal.
For example, consider the following output from Enforcer (when
SegTracker is running):
BYTE-READ from 00000000 PC: 7833432C
USP: 7834B4B0 SR: 0004 SW: 0751 (U0)(-)(-) TCB: 7828F188
Data: 00000000 0000000D 78348FB8 7829016C 00000001 1E0CCF39 78348FB8 00000001
Addr: 00000000 7828F1E4 783343AE 7829016C 7834B6C0 7834B4B4 78019864 --------
Stck: 00000000 7829016C 78334306 783341F2 00000000 00000000 00000000 00000000
Stck: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
----> 7833432C - "xxx" Hunk 0000 Offset 00000244
Name: "Shell Process" CLI: "xxx" Hunk 0000 Offset 00000244
The interested lines are the first and last. The first line says the
hit was a byte read from $00000000 (probably from dereferencing a NIL
pointer). The last line says that the culprit was the program "xxx"
and that the hit happened at offset $00000244. If "xxx" has been
compiled with LINEDEBUG (or DEBUG) then you can run EFindHit on it to
find the line number of the hit in one of the source files:
1.System:> efindhit xxx $244
Offset $244 is line 7 of "xxx.e"
Have fun!
============================= Archive contents =============================
Original Packed Ratio Date Time Name
-------- ------- ----- --------- -------- -------------
5324 3056 42.5% 27-Feb-97 20:17:06 efindhit
2293 1085 52.6% 27-Feb-97 20:30:08 efindhit.readme
-------- ------- ----- --------- --------
7617 4141 45.6% 28-Feb-97 23:23:26 2 files