[fpc-pascal] Separate debug info for release builds

Henry Vermaak henry.vermaak at gmail.com
Mon Nov 4 12:46:29 CET 2024


On Fri, 1 Nov 2024 at 21:22, Nikolay Nikolov via fpc-pascal
<fpc-pascal at lists.freepascal.org> wrote:
> Because Free Pascal doesn't support smartlinking+debug info on most
> platforms. The only exception is macOS, where it is actually supported.

Do you know why it's not supported?  What are the barriers to supporting it?

It's quite common to ship an optimised build with separate debug info
so either the user can add them later to get a useful backtrace, or
the developer can convert addresses to lines in gdb (info line
*0x1234).  Debian's debug packages work like this.

> Adding --gc-sections to the linker on other platforms will probably
> result in broken debug info and is not guaranteed to work. Of course,
> you are encouraged to try it and test it, and see if it works, but it
> probably doesn't.

It works fine in a simple example, I'll test for larger builds.  I'd
be hesitant to ship something that isn't supported, though.  That
means I'll have to roll separate debug installers, which is a pain.

Henry


More information about the fpc-pascal mailing list