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

Tomas Hajny XHajT03 at hajny.biz
Fri Feb 20 16:49:41 CET 2026


On 2026-02-20 13:02, Graeme Geldenhuys via fpc-devel wrote:
> On 2026-02-20 01:31, Graeme Geldenhuys via fpc-devel wrote:


Hi Graeme,

>> More soon. ;-)
> 
> What is it? A fully working, native FPC debug format and debugger. I 
> designed
> a new debug format from scratch (ditching the very C-centric DWARF 
> format and
> its many versions) and added support into FPC `main` (3.3.1) via a 
> feature
> branch. That's all on the compiler side.
> 
> On the client side, I implemented a debug engine from scratch along 
> with
> a reference CLI debugger client (seen in my previous message). For the 
> engine,
> I used a Hexagonal design (aka Ports & Adapters). This means the debug 
> engine
> does all the heavy lifting and exposes methods that the thin "debug 
> client"
> (in my case, the CLI debugger) can simply call to display output and 
> orchestrate
> user interaction.
> 
> Integrating this into Lazarus IDE or MSEide simply means implementing 
> the equivalent
> `pdr-cli` [thin] layer. Nothing needs to be changed in the debug engine 
> itself.
> 
> I'll reveal more soon with a Pull Request. I'll include links to my 
> analysis,
> the OPDF specification, and Implementation Architecture documents. A 
> huge
> amount of research has gone into this -- studying Kylix, Delphi, and 
> DWARF.
> Finally, I've scratched that 14-year itch I had, triggered by the duby 
> release. :)

It's certainly very interesting. :-) Obviously, it will be necessary to 
understand, what that means for binaries including e.g. object files 
written in C, where / how is the debug information stored (having it 
inside the binaries implies support for that in various linkers), etc. 
Looking forward to seeing what and how you did there. :-)

Have a nice weekend

Tomas


More information about the fpc-devel mailing list