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

Michael Van Canneyt michael at freepascal.org
Mon Jan 4 08:52:33 CET 2016



On Mon, 4 Jan 2016, Denis Kozlov wrote:

> Hello,
>
> 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.
> http://bugs.freepascal.org/view.php?id=13518
> http://bugs.freepascal.org/view.php?id=28283
>
> 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.
> http://bugs.freepascal.org/view.php?id=28288
>
> 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.

Not always: I have web apps where I log a backtrace of errors.
So speed is actually important too.

>
> 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.

I would go for the latter. Maybe it is possible to make it configurable ?

Michael.



More information about the fpc-devel mailing list