This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix up DW_AT_accessibility (PR debug/45124)


On 07/29/2010 04:20 PM, Jakub Jelinek wrote:
Actually, given the response on Dwarf-Discuss, I believe we should
limit this only to DW_TAG_member and DW_TAG_subprogram (to match the spec;
DW_TAG_inheritance handled in the other routine), as for say types and other
children of DW_TAG_class_type no DECL_PRIVATE doesn't mean we need to emit
DW_AT_accessibility DW_ACCESS_public, but instead just that accessibility
is not meaningful for it.

All class members have accessibility; the accessibility of a nested type or enumerator has the same meaning as for a data or function member.


DWARF2 default for DW_TAG_inheritance if DW_AT_accessibility is missing is
private, yes (and the other hunk which handles DW_TAG_inheritance implements
that).
DWARF2 doesn't seem to talk at all about default for DW_TAG_member or
DW_TAG_subprogram, so the patch above just kept status quo in that case for
DWARF2 and only changed to what DWARF3 says for dwarf_version > 2.
Other options are emit DW_AT_accessibility always for
DW_TAG_member/DW_TAG_subprogram for dwarf_version == 2, or pretend the
DWARF3+ rules (private in DW_TAG_class_type, public otherwise) apply even
for DWARF2.  Not sure what is best.

Sticking with the status quo for DWARF2 is fine.


Jason


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]