|
The FPC RTL license, Free Pascal only
You always envied Delphinists who get the source name and line number to go with the exception address for free? Frustrated by the standard FPC RTL modules that should do the same... but never work?
Well, you got the solution. This one surely works (checked with FPC 2.2.0 for Win and Lin). It works for exe and dll alike.
Download (22K)
12 apr. 2008: update. Corrected a bug in brutalstrip, now doesn't cut out the .reloc section from the dlls.
09 feb. 2008: update. Now uses zstream, the extracted line info is compressed and takes les space
- Works from within a DLL
- Correctly determines if the address belongs to one of the DLLs loaded by your EXE and tries to load the line info from them
- Includes a utility to extracting the dwarf line info from executables into a separate file, allowing to strip them and save several hundreds kilobytes in size.
- Always explains WHY it won't retrieve the line number when it is not possible.
Like dr. Frankenshtein I sewn this library together from the dead meat of the FPC RTL modules lineinfo.pp and lnfodwrf.pp.
There could be issues with the future FPC versions, and some things don't look too reliable, but it works never the less.