Hi,
I just filed this bug report: https://bugzilla.redhat.com/show_bug.cgi?id=527430 It shows gcc producing a duplicate DW_AT_const_value for a DW_TAG_variable where the value is already in the referenced DW_AT_abstract_origin.
Maybe this is something that dwarflint can check/warn for and/or removed by the dwarf compressor/writer when found.
Cheers,
Mark
I just filed this bug report: https://bugzilla.redhat.com/show_bug.cgi?id=527430 It shows gcc producing a duplicate DW_AT_const_value for a DW_TAG_variable where the value is already in the referenced DW_AT_abstract_origin.
Maybe this is something that dwarflint can check/warn for and/or removed by the dwarf compressor/writer when found.
A generic dwarflint check sounds right for this. If a given attribute name is present on a DIE, it is suspicious if that attribute name appears on the DIE that's the first DIE's DW_AT_abstract_origin or DW_AT_specification. If the two attribute values are not identical, it's either more or less suspicious, but merits specifically mentioning whether it's a superfluous identical override or a curious nonidentical override.
We may one day have canonicalization logic that fixes these things from old producers, but more likely we'll just get the new compilers fixed not to do it and avoid having our transformations make any semantic changes to old data.
Thanks, Roland
elfutils-devel@lists.fedorahosted.org