Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2026-04

[ANN] Unofficial FPC 3.3.1 binary release with OPDF debugger support

2 messages · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Unknown author

Hi all,

I'd like to share an unofficial pre-built binary release of FPC 3.3.1 for
Linux x86_64, with support for the Object Pascal Debug Format (OPDF) ? a new debug information format designed specifically for Free Pascal and Object Pascal language features.

The release is available here:
https://github.com/graemeg/fpc-opdf-releases/releases

WHY OPDF?

DWARF is a general-purpose format and does not natively understand Object
Pascal concepts. OPDF addresses this by providing first-class support for:

- Properties (field-backed and method-backed, including getter evaluation)
- String types: ShortString, AnsiString, UnicodeString
- Dynamic arrays with correct length display
- Class instances with inherited fields and interfaces
- Sets with enum member name display

OPDF data is embedded as an ELF .opdf section alongside your existing code.
It coexists with DWARF ? you can use -gO and -gw together if you also need
GDB compatibility.

TRYING IT OUT

Download the archive from the releases page, extract it, and run the bundled install.sh:

tar -xzf fpc-3.3.1-unofficial-opdf-<date>-g<sha>-x86_64-linux.tar.gz cd fpc-3.3.1-unofficial-opdf-<date>-g<sha>-x86_64-linux/ ./install.sh "$HOME/fpc-3.3.1-opdf"
export PATH="$HOME/fpc-3.3.1-opdf/bin:$PATH"

Then compile your project with:

fpc -gO myproject.pas

The reference command-line debugger (PDR) for OPDF is available at: https://github.com/graemeg/opdebugger

CURRENT STATUS

PDR is a working CLI debugger (reference implementation) that reads OPDF data and controls the debuggee via Linux ptrace. It supports breakpoints,
source-level stepping, call stack display, variable evaluation for all standard Object Pascal types, property evaluation, watchpoints, and more.
27 automated integration tests cover the supported feature set.

Known limitations at this stage:
- Linux x86_64 only (Windows and macOS planned)
- Variant records, Variant type, and generics not yet covered

FEEDBACK

This is an experimental release ? feedback, bug reports, and testing across
different codebases are very welcome.

- OPDF / PDR issues: https://github.com/graemeg/opdebugger/issues
- FPC compiler issues:
https://gitlab.com/freepascal.org/fpc/source/-/work_items

Regards,
- Graeme -

Reply by email

Unknown author
to Unknown author
mailinglists--- wrote 6 lines
WHY OPDF? DWARF is a general-purpose format and does not natively understand Object Pascal concepts. OPDF addresses this by providing first-class support for:

Hi everyone,

I?ve had some great technical side-discussions following the OPDF announcement, particularly regarding how DWARF (version 3 and 4) does actually have the capacity to describe things like dynamic array lengths and set member names.

I wanted to clarify a few points from my previous mail to ensure I?m not misrepresenting the current state of DWARF:

1. DWARF is capable, but often "unreachable"
While DWARF 3+ can encode complex Pascal constructs (using DW_OP_push_object_address and subrange types), FPC currently defaults to DWARF 2 (-gw). Most users never see these improvements unless they manually opt into -gw3 or higher. OPDF aims to make these features "on by default" and native to the format.

2. The Tooling Gap
Even when FPC emits high-version DWARF, common tools like GDB and LLDB often fail to interpret those Pascal-specific expressions correctly. While fpdebug in Lazarus does a fantastic job of "heavy lifting" to make DWARF work for us, that logic is currently tied to the IDE.

3. Portability and "Native" Support
The goal of OPDF isn't to say "DWARF can't do this," but rather "Standard DWARF consumers don't do this for Pascal." By moving the logic into a native format:

* We eliminate the "translation hacks" needed to make C-centric debuggers understand Pascal.

* We provide a path for improved Pascal debugging in other environments (VS Code, Vim, CLI).

* We get first-class support for method-backed properties?something DWARF still struggles to represent cleanly without complex expression evaluation.

I hope this clears up any confusion! OPDF is about providing a zero-translation, native experience that works out of the box regardless of which IDE or toolchain you prefer.

Regards,
- Graeme -

Reply by email