home *** CD-ROM | disk | FTP | other *** search
/ Aminet 18 / aminetcdnumber181997.iso / Aminet / dev / e / efindhit.lha / efindhit.readme < prev   
Text File  |  1997-02-27  |  2KB  |  52 lines

  1. Short: EFindHit 1.0 (for Enforcer output)
  2. Type: dev/e
  3. Author: jason@fsel.com (Jason R. Hulance)
  4.  
  5. EFindHit can be used to find the line number of an Enforcer hit in an
  6. E program, given the offset information that Enforcer produces.
  7. Unlike normal FindHit programs, EFindHit reports the line numbers of
  8. hits in E modules, too (i.e., not just the main program).
  9.  
  10. To use EFindHit, the main source file *must* be compiled with the
  11. LINEDEBUG or DEBUG switches.  And if you want to track hits in modules
  12. used by the program, they too must be compiled with one of these
  13. switches.  The one limitation is that hits in E built-in functions
  14. will be reported by Enforcer as being the fault of the program, but
  15. EFindHit will report them as coming from the last line of one of the
  16. sources.  (As a help, EFindHit will flag those offsets that appear to
  17. be too far beyond the last line, and warn you that they may be in E
  18. built-in functions.)
  19.  
  20. EFindHit takes the following arguments:
  21.  
  22.   EXECUTABLE/A,OFFSETS/A/M
  23.  
  24. So, you can supply a list of offsets.  Hexadecimal offsets can be
  25. specified using a leading '$' or '0x'.  Without these prefixes the
  26. offset is interpreted as decimal.
  27.  
  28. For example, consider the following output from Enforcer (when
  29. SegTracker is running):
  30.  
  31.   BYTE-READ from 00000000                        PC: 7833432C
  32.   USP:  7834B4B0 SR: 0004 SW: 0751  (U0)(-)(-)  TCB: 7828F188
  33.   Data: 00000000 0000000D 78348FB8 7829016C 00000001 1E0CCF39 78348FB8 00000001
  34.   Addr: 00000000 7828F1E4 783343AE 7829016C 7834B6C0 7834B4B4 78019864 --------
  35.   Stck: 00000000 7829016C 78334306 783341F2 00000000 00000000 00000000 00000000
  36.   Stck: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
  37.   ----> 7833432C - "xxx"  Hunk 0000 Offset 00000244
  38.   Name: "Shell Process"  CLI: "xxx"  Hunk 0000 Offset 00000244
  39.  
  40. The interested lines are the first and last.  The first line says the
  41. hit was a byte read from $00000000 (probably from dereferencing a NIL
  42. pointer). The last line says that the culprit was the program "xxx"
  43. and that the hit happened at offset $00000244.  If "xxx" has been
  44. compiled with LINEDEBUG (or DEBUG) then you can run EFindHit on it to
  45. find the line number of the hit in one of the source files:
  46.  
  47.   1.System:> efindhit xxx $244
  48.   Offset $244 is line 7 of "xxx.e"
  49.  
  50.  
  51. Have fun!
  52.