<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
I started a proposal to add strict private/protected to DWARF.<br>
<br>
If I could have some thoughts on the below question please. <br>
<br>
If I understand that correct, the idea may be to add DW_VIS_local /
DW_VIS_exported in addition to DW_ACCESS_private.<br>
And this would indicate if a private symbol can be seen within its
containing unit. (same for protected)
<div class="moz-forward-container"><br>
<br>
1) from a language design point: how fitting is this?<br>
<br>
2) Is this complete, as in: No "side effect" of "strict" is being
overlooked? (strict really only affects code of the same unit,
that is outside the class and its decendents / no decendent is
affected, not in, nor outside the unit)<br>
<br>
-------- Forwarded Message --------
<table cellpadding="0" cellspacing="0" border="0"
class="moz-email-headers-table">
<tbody>
<tr>
<th valign="BASELINE" align="RIGHT" nowrap="nowrap">Subject:
</th>
<td>Re: New Issue: Accessibility Declarations for FreePascal</td>
</tr>
<tr>
<th valign="BASELINE" align="RIGHT" nowrap="nowrap"><br>
</th>
<td><br>
</td>
</tr>
<tr>
<th valign="BASELINE" align="RIGHT" nowrap="nowrap"><br>
</th>
<td><br>
</td>
</tr>
<tr>
<th valign="BASELINE" align="RIGHT" nowrap="nowrap"><br>
</th>
<td><br>
</td>
</tr>
<tr>
<th valign="BASELINE" align="RIGHT" nowrap="nowrap"><br>
</th>
<td><br>
</td>
</tr>
</tbody>
</table>
<br>
<br>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<p>Hey Martin,</p>
<p>We have been discussing your request for new Accessibility
Declarations for Free Pascal. <a class="moz-txt-link-freetext"
href="https://dwarfstd.org/issues/260428.1.html"
moz-do-not-send="true">https://dwarfstd.org/issues/260428.1.html</a></p>
<p>If you look at the latest version of the draft standard
<a class="moz-txt-link-freetext"
href="https://snapshots.sourceware.org/dwarfstd/dwarf-spec/2026-09-20_22-49_1789944541/dwarf6-20260920-2248.pdf"
moz-do-not-send="true">https://snapshots.sourceware.org/dwarfstd/dwarf-spec/2026-09-20_22-49_1789944541/dwarf6-20260920-2248.pdf</a>
on page 30 there are two sections very close to each other.
Accessibility of Declarations and Visibility of Declarations and
it needs to be understood that the second one does not refer to
ELF symbol visibility it is language level visibility.</p>
<p>When we refer to your language <a
class="moz-txt-link-freetext"
href="https://www.freepascal.org/docs-html/ref/refse35.html"
moz-do-not-send="true">https://www.freepascal.org/docs-html/ref/refse35.html</a>
specification it talks about <br>
<br>
<br>
<img src="https://www.freepascal.org/docs-html/ref/ref84x.png"
alt="--class visibility specifier-------------private-------------------------
|-strict-| -protected--||
|-------public---------|
-------published -------
" moz-do-not-send="true"></p>
<p>And so it specifies "class visibility specifier". So we are
trying to figure out if FreePascal should use visibility rather
than or in addition to Accessibility of Declarations. The
problem is I don't think any of us are really well versed in
FreePascal or the old Delphi and Borland TurboPascal and the
language semantics of those compilers to be able to really be
able to know what the intent is for sure.</p>
<p>So far what we have kind of decided that strict private and
strict protected map more closely to DW_ACCESS_private and
DW_ACCESS_protected since they are conceptually closer to C++'s
private and protected. </p>
<p>Then in my draft we have added DW_ACCESS_module_private and
DW_ACCESS_module_protected but is that actually more like
DW_ACCESS_public with DW_VIS_local. Would you be able to shed
some light on the matter with regards to how Delphi and now
FreePascal understand the visibility and accessability question.
I'm sorry, while there are a few of us who have some
Familiariaty with Modula 2 but it is a distant recollection from
University and I don't think any of us have any experience with
the later evolution of Pascal and so we are all a bit confused
by this.</p>
<p>-ben</p>
<div class="moz-cite-prefix">On 4/28/26 10:37 AM, Ben Woodard
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:e422d509-f350-4521-a91e-f090b44edaca@redhat.com">
<meta http-equiv="content-type"
content="text/html; charset=UTF-8">
<p>Cary, this references the DWARF discussion "Additional values
for DW_AT_accessibility" recently on DWARF-discuss. If this
actually needs a champion, I'll champion it. Super simple, add
a couple of defines. Like the recent errata, I feel like it is
a wave-through.</p>
<p>---------------------------------</p>
<p>Issue:</p>
<p>DWARF5 only has Accessibility declarations <font
face="monospace">DW_ACCESS_public DW_ACCESS_private</font>
and <font face="monospace">DW_ACCESS_protecte</font>.
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. </p>
<p>The full list can be found at: <a
class="moz-txt-link-freetext"
href="https://www.freepascal.org/docs-html/ref/refse35.html"
moz-do-not-send="true">https://www.freepascal.org/docs-html/ref/refse35.html</a></p>
<p>Proposal:</p>
<p>In Section 2.7 in Table 2.4 Add two more accessibility codes:
<font face="monospace">DW_ACCESS_strict_private</font> and <font
face="monospace">DW_ACCESS_strict_protected</font>.</p>
<p>In Section 8.9 in Table 8.14 Add the following entries to
table 8.14:</p>
<table cellpadding="2" cellspacing="2" border="1" width="100%">
<tbody>
<tr>
<td valign="top">Accessibility code name</td>
<td valign="top">Value</td>
</tr>
<tr>
<td valign="top">DW_ACCESS_strict_private</td>
<td valign="top">TBD</td>
</tr>
<tr>
<td valign="top">DW_ACCESS_strict_protected</td>
<td valign="top">TBD</td>
</tr>
</tbody>
</table>
<p><br>
</p>
</blockquote>
</div>
</body>
</html>