[applied] Fix DWARF type DIE canonicalization
Commit Message
Hello,
While looking at something else, I noticed that the DWARF type DIE
canonicalization code wasn't taking the type of array elements into
account when comparing arrays.
This patch fixes that.
* src/abg-dwarf-reader.cc (compare_dies): When comparing array
type DIEs, take into account the type of the elements of the
arrays.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
Applied to master.
---
src/abg-dwarf-reader.cc | 10 ++++++++++
1 file changed, 10 insertions(+)
@@ -10247,6 +10247,16 @@ compare_dies(const read_context& ctxt,
}
if (found_l_child != found_r_child)
result = false;
+ // Compare the types of the elements of the array.
+ Dwarf_Die ltype_die, rtype_die;
+ bool found_ltype = die_die_attribute(l, DW_AT_type, ltype_die);
+ bool found_rtype = die_die_attribute(r, DW_AT_type, rtype_die);
+ ABG_ASSERT(found_ltype && found_rtype);
+
+ if (!compare_dies(ctxt, <ype_die, &rtype_die,
+ aggregates_being_compared,
+ update_canonical_dies_on_the_fly))
+ return false;
}
break;