[PR63238] output alignment debug information
Alexandre Oliva
aoliva@redhat.com
Mon Jan 30 17:55:00 GMT 2017
On Jan 29, 2017, Cary Coutant <ccoutant@gmail.com> wrote:
>> for gcc/ChangeLog
>>
>> PR debug/63238
> This is OK so far, but the DW_AT_alignment attribute also needs to be
> added to the checksum computation in die_checksum and
> die_checksum_ordered.
Thanks. I see what to do in die_checksum_ordered, but die_checksum? It
seems to handle attributes by value class, and AFAICT the classes that
DW_AT_alignment could use are already covered. What am I missing?
Here's a patch I'm about to start testing. Does it look ok?
[PR63238] include alignment debug information in DIE checksum
Add DW_AT_alignment to the DIE checksum.
for gcc/ChangeLog
PR debug/63238
* dwarf2out.c (struct checksum_attributes): Add at_alignment.
(collect_checksum_attributes): Set it.
(die_checksum_ordered): Use it.
---
gcc/dwarf2out.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index f8fe4c1..15b7a66 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -6600,6 +6600,7 @@ struct checksum_attributes
dw_attr_node *at_friend;
dw_attr_node *at_accessibility;
dw_attr_node *at_address_class;
+ dw_attr_node *at_alignment;
dw_attr_node *at_allocated;
dw_attr_node *at_artificial;
dw_attr_node *at_associated;
@@ -6673,6 +6674,9 @@ collect_checksum_attributes (struct checksum_attributes *attrs, dw_die_ref die)
case DW_AT_address_class:
attrs->at_address_class = a;
break;
+ case DW_AT_alignment:
+ attrs->at_alignment = a;
+ break;
case DW_AT_allocated:
attrs->at_allocated = a;
break;
@@ -6879,6 +6883,7 @@ die_checksum_ordered (dw_die_ref die, struct md5_ctx *ctx, int *mark)
CHECKSUM_ATTR (attrs.at_vtable_elem_location);
CHECKSUM_ATTR (attrs.at_type);
CHECKSUM_ATTR (attrs.at_friend);
+ CHECKSUM_ATTR (attrs.at_alignment);
/* Checksum the child DIEs. */
c = die->die_child;
--
Alexandre Oliva, freedom fighter http://FSFLA.org/~lxoliva/
You must be the change you wish to see in the world. -- Gandhi
Be Free! -- http://FSFLA.org/ FSF Latin America board member
Free Software Evangelist|Red Hat Brasil GNU Toolchain Engineer
More information about the Gcc-patches
mailing list