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 -
