Issue 260428.1: Accessibility Declarations for FreePascal

Author: Martin Friebe
Champion: Ben Woodard
Date submitted: 2026-04-28
Date revised: 2026-09-29
Date closed:
Type: Enhancement
Status: Open
DWARF version: 6

Accessibility Declarations for FreePascal

Issue

DWARF5 only has Accessibility declarations DW_ACCESS_public, DW_ACCESS_private, and DW_ACCESS_protected. However, FreePascal has a couple more that need to be represented. This is needed so that debuggers can report it back to users and so that ABI checkers like libabigail can detect changes to the API which would then change the ABI of an object.

The full list can be found in the Free Pascal Reference Guide.

Proposal

In Section 2.7:

Add Pascal to the list of languages which have Accessibility of Declarations so that it reads:

Some languages, notably C++, Ada, and Pascal have the concept of the accessibility of an object or of some other program entity. The accessibility specifies which classes of other program objects are permitted access to the object in question.

Just before the table in Section 2.7 add this paragraph:

The precise meaning and semantics of these codes must be interpreted in the context of the rules of source language where the declaration is made.

In Table 2.4 Add three more accessibility codes and add second column with their meanings:

Accessibility code name Meaning
DW_ACCESS_public The declaration can be used anywhere without access restriction.
DW_ACCESS_private The declaration can be used only by members and friends of the class in which it is declared.
DW_ACCESS_protected The declaration can be used only by members and friends of the class in which it is declared, by classes derived from that class, and by their friends.
DW_ACCESS_module_private The declaration can only be accessed in the module that contains the declaration.
DW_ACCESS_module_protected The declaration can only be accessed in the module that contains the declaration.
DW_ACCESS_published Similar in access policy to public with additonal RTTI information preserved for visual programming.

In Section 8.9 in Table 8.14 Add the following entries to table 8.14:

Accessibility code name Value
DW_ACCESS_module_private TBD
DW_ACCESS_module_protected TBD
DW_ACCESS_published TBD

2026-05-10: Added DW_ACCESS_published for completeness.

2026-09-24: Added Pascal to non-normative text listing languages that have accessibility attributes.

2026-09-29: Removed DW_ACCESS_strict_private/protected and added DW_ACCESS_module_private/protected; Added basic semantics of different policies.