[Bug debug/45124] No DW_AT_accessibility for public DIEs in DW_TAG_class_type

2011-01-24 Thread jan.kratochvil at redhat dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45124

Jan Kratochvil jan.kratochvil at redhat dot com changed:

   What|Removed |Added

 CC||jan.kratochvil at redhat
   ||dot com

--- Comment #5 from Jan Kratochvil jan.kratochvil at redhat dot com 
2011-01-24 10:41:17 UTC ---
DWARF3 leaves the meaning for struct/union unspecified:
An inheritance entry may have a DW_AT_accessibility attribute. If no
accessibility attribute is present, private access is assumed for an entry of a
class and public access is assumed for an entry of an interface.

DWARF4 specifies:
An inheritance entry may have a DW_AT_accessibility attribute. If no
accessibility attribute is present, private access is assumed for an entry of a
class and public access is assumed for an entry of an interface, struct or
union.

DWARF2 had:
An inheritance entry may have a DW_AT_accessibility attribute. If no
accessibility attribute is present, private access is assumed.

So I guess DWARF3 was meant like what DWARF4 says and GDB should be changed for
both DWARF3 and DWARF4.


[Bug debug/45124] No DW_AT_accessibility for public DIEs in DW_TAG_class_type

2010-09-20 Thread jakub at gcc dot gnu dot org


--- Comment #3 from jakub at gcc dot gnu dot org  2010-09-20 16:48 ---
Subject: Bug 45124

Author: jakub
Date: Mon Sep 20 16:48:29 2010
New Revision: 164442

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=164442
Log:
PR debug/45124
* dwarf2out.c (add_accessibility_attribute): Assume
DW_ACCESS_private as the default for dwarf_version  2
and DW_TAG_class_type parent.
(gen_inheritance_die): Assume DW_ACCESS_public as the default
for dwarf_version  2 and parent other than DW_TAG_class_type.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/dwarf2out.c


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45124



[Bug debug/45124] No DW_AT_accessibility for public DIEs in DW_TAG_class_type

2010-09-20 Thread jakub at gcc dot gnu dot org


--- Comment #4 from jakub at gcc dot gnu dot org  2010-09-20 16:51 ---
Fixed.


-- 

jakub at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45124



[Bug debug/45124] No DW_AT_accessibility for public DIEs in DW_TAG_class_type

2010-07-29 Thread jakub at gcc dot gnu dot org


--- Comment #1 from jakub at gcc dot gnu dot org  2010-07-29 08:55 ---
Looking at GDB:
  /* Handle accessibility and virtuality of field.
 The default accessibility for members is public, the default
 accessibility for inheritance is private.  */
  if (die-tag != DW_TAG_inheritance)
new_field-accessibility = DW_ACCESS_public;
  else
new_field-accessibility = DW_ACCESS_private;

i.e. it seems to match what GCC (wrongly) does.
I'm afraid we need to live with some extra DW_AT_accessibility attributes for
compatibility.


-- 

jakub at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |jakub at gcc dot gnu dot org
   |dot org |
 Status|UNCONFIRMED |ASSIGNED
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2010-07-29 08:55:14
   date||


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45124



[Bug debug/45124] No DW_AT_accessibility for public DIEs in DW_TAG_class_type

2010-07-29 Thread jakub at gcc dot gnu dot org


--- Comment #2 from jakub at gcc dot gnu dot org  2010-07-29 08:58 ---
Created an attachment (id=21346)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21346action=view)
gcc46-pr45124.patch

Untested fix.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45124