[fpc-devel] Fixing line info units (stabs, dwarf)

Denis Kozlov dezlov at gmail.com
Mon Jan 4 06:00:07 CET 2016


I want to fix couple of issues with line info units, STABS
(lineinfo.pp) and DWARF (lnfodwrf.pp):

1) Back trace is permanently disabled once a module without line info
is encountered. This has already been fixed in STABS (r31026, r31025),
similar changes can be applied to DWARF.

2) When line info data/result are reused, as already implemented in
STABS, if an invalid address is supplied then further calls to get
line info may result in undefined behavior.

A possible solution to these problems is to completely disable reuse
of line info data/result. This will make line info more stable and
resilient, but at a cost of decreased performance due to repeated
parsing of same modules. Perhaps stability is more important than
speed when debugging.

Otherwise, we can decide not to care about cases when invalid
addresses are supplied and continue reusing line info data/result. In
this case I will just re-apply fixes from STABS to DWARF.

Any thoughts?


More information about the fpc-devel mailing list