[fpc-devel] A little something I've been working on...

Tomas Hajny XHajT03 at hajny.biz
Sun Feb 22 20:34:58 CET 2026


On 2026-02-22 19:35, Martin Frb via fpc-devel wrote:
> On 22/02/2026 19:11, Kostas Michalopoulos via fpc-devel wrote:
>> On 2/21/26 7:36 PM, Martin Frb via fpc-devel wrote:
>>> Well, yes, you still save on **encoding** Pascal into Dwarf. But you 
>>> have to decode 2 debug formats. (or more, depending on which others 
>>> you want to support, in any case: 1 more than otherwise)
>> 
>> FWIW in practice FPC being able to emit DWARF debug information is 
>> useful for other tools too, like Valgrind and Perf (and other 
>> performance analyzers) so i do not think that dropping DWARF support 
>> is a good idea.
>> 
>> Of course a better debug experience with FPC + Lazarus would be great 
>> because there are always annoyances here and there but that shouldn't 
>> happen by removing existing functionality (being able to step into 
>> non-FPC code) and interoperability (being able to use FPC binaries 
>> with any tool that understands DWARF)
> 
> Aside from his "he wanted to do it for the experience" the reasoning 
> about Dwarf is - as previously indicated - IMHO incorrect.
> Dwarf supports a lot more than we use. And can be extended (official 
> and fpc-only).
> 
> I would say the biggest problems with debugging today (Win/Linux / 
> Intel) is caused by missing implementation in the compiler.
> 
> And well, his work including a new info-format fixes this, that is 
> true.
> But...
>  It isn't the new format that does the fix, it is the fact that he 
> implemented it into the compiler.
>  Had he done the same using Dwarf, and he would have had the same 
> fixes.
  .
  .

To be honest, I don't see this as an issue. There's nothing suggesting 
that DWARF support would or should be dropped. FPC supports two 
different debug formats at the moment, there's no reason why three 
should be an issue, especially if there's somebody interested to 
continue supporting this third format. Having certain features supported 
in the compiler for OPDF probably provides at least some hints for 
somebody sufficiently knowledgeable about DWARF to implement similar 
support in this format as well - from this point of view it would be 
direct benefit in any case. And if somebody wants to debug certain code 
and encounters some issues with one format, having a possibility to 
compile the same code with a different debug information format to 
overcome these issues is great from my point of view...

Just my 2 cents

Tomas


More information about the fpc-devel mailing list