public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/45124] New: No DW_AT_accessibility for public DIEs in DW_TAG_class_type
@ 2010-07-29 8:32 jakub at gcc dot gnu dot org
2010-07-29 8:55 ` [Bug debug/45124] " jakub at gcc dot gnu dot org
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: jakub at gcc dot gnu dot org @ 2010-07-29 8:32 UTC (permalink / raw)
To: gcc-bugs
Dwarf 3 and 4 state that if DW_AT_accessibility is missing, the default is
DW_ACCESS_private in DW_TAG_class_type and DW_ACCESS_public otherwise.
Unfortunately dwarf2out.c assumes the default is DW_ACCESS_public always.
Not sure if GDB (or other dwarf consumers) makes the same assumption.
If not, then we can add DW_ACCESS_public DW_AT_accessibility in
DW_TAG_class_type for everything that didn't have it till now and drop
DW_ACCESS_private accessibility, if yes, then I'm afraid all we can do for the
time being is just add DW_ACCESS_public accessibility and keep
DW_ACCESS_private accessibility too.
--
Summary: No DW_AT_accessibility for public DIEs in
DW_TAG_class_type
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Keywords: wrong-debug
Severity: normal
Priority: P3
Component: debug
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jakub at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45124
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug debug/45124] No DW_AT_accessibility for public DIEs in DW_TAG_class_type
2010-07-29 8:32 [Bug debug/45124] New: No DW_AT_accessibility for public DIEs in DW_TAG_class_type jakub at gcc dot gnu dot org
@ 2010-07-29 8:55 ` jakub at gcc dot gnu dot org
2010-07-29 8:58 ` jakub at gcc dot gnu dot org
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu dot org @ 2010-07-29 8:55 UTC (permalink / raw)
To: gcc-bugs
------- 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|0000-00-00 00:00:00 |2010-07-29 08:55:14
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45124
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug debug/45124] No DW_AT_accessibility for public DIEs in DW_TAG_class_type
2010-07-29 8:32 [Bug debug/45124] New: No DW_AT_accessibility for public DIEs in DW_TAG_class_type jakub at gcc dot gnu dot org
2010-07-29 8:55 ` [Bug debug/45124] " jakub at gcc dot gnu dot org
@ 2010-07-29 8:58 ` jakub at gcc dot gnu dot org
2010-09-20 16:49 ` jakub at gcc dot gnu dot org
2010-09-20 16:51 ` jakub at gcc dot gnu dot org
3 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu dot org @ 2010-07-29 8:58 UTC (permalink / raw)
To: gcc-bugs
------- 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=21346&action=view)
gcc46-pr45124.patch
Untested fix.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45124
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug debug/45124] No DW_AT_accessibility for public DIEs in DW_TAG_class_type
2010-07-29 8:32 [Bug debug/45124] New: No DW_AT_accessibility for public DIEs in DW_TAG_class_type jakub at gcc dot gnu dot org
2010-07-29 8:55 ` [Bug debug/45124] " jakub at gcc dot gnu dot org
2010-07-29 8:58 ` jakub at gcc dot gnu dot org
@ 2010-09-20 16:49 ` jakub at gcc dot gnu dot org
2010-09-20 16:51 ` jakub at gcc dot gnu dot org
3 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu dot org @ 2010-09-20 16:49 UTC (permalink / raw)
To: gcc-bugs
------- 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=gcc&view=rev&rev=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
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug debug/45124] No DW_AT_accessibility for public DIEs in DW_TAG_class_type
2010-07-29 8:32 [Bug debug/45124] New: No DW_AT_accessibility for public DIEs in DW_TAG_class_type jakub at gcc dot gnu dot org
` (2 preceding siblings ...)
2010-09-20 16:49 ` jakub at gcc dot gnu dot org
@ 2010-09-20 16:51 ` jakub at gcc dot gnu dot org
3 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu dot org @ 2010-09-20 16:51 UTC (permalink / raw)
To: gcc-bugs
------- 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
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug debug/45124] No DW_AT_accessibility for public DIEs in DW_TAG_class_type
[not found] <bug-45124-4@http.gcc.gnu.org/bugzilla/>
@ 2011-01-24 12:12 ` jan.kratochvil at redhat dot com
0 siblings, 0 replies; 6+ messages in thread
From: jan.kratochvil at redhat dot com @ 2011-01-24 12:12 UTC (permalink / raw)
To: gcc-bugs
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.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-01-24 10:41 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-29 8:32 [Bug debug/45124] New: No DW_AT_accessibility for public DIEs in DW_TAG_class_type jakub at gcc dot gnu dot org
2010-07-29 8:55 ` [Bug debug/45124] " jakub at gcc dot gnu dot org
2010-07-29 8:58 ` jakub at gcc dot gnu dot org
2010-09-20 16:49 ` jakub at gcc dot gnu dot org
2010-09-20 16:51 ` jakub at gcc dot gnu dot org
[not found] <bug-45124-4@http.gcc.gnu.org/bugzilla/>
2011-01-24 12:12 ` jan.kratochvil at redhat dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).