summaryrefslogtreecommitdiffstats
path: root/cddl/contrib/opensolaris
diff options
context:
space:
mode:
authormarkj <markj@FreeBSD.org>2015-11-13 01:27:20 +0000
committermarkj <markj@FreeBSD.org>2015-11-13 01:27:20 +0000
commit8a2f0f6fa458a8bccaab456c1fc482de20a4583e (patch)
tree69b977cbb56baf0cdc6591709da2e9e8cb15c047 /cddl/contrib/opensolaris
parent2f7340b2834385328346377b624f6b4694749e02 (diff)
downloadFreeBSD-src-8a2f0f6fa458a8bccaab456c1fc482de20a4583e.zip
FreeBSD-src-8a2f0f6fa458a8bccaab456c1fc482de20a4583e.tar.gz
MFC r289866:
DWARF emitted by clang 3.7 encodes array sizes using the DW_AT_count attribute rather than DW_AT_upper_bound. Teach ctfconvert about this so that array type sizes are encoded correctly. PR: 203772
Diffstat (limited to 'cddl/contrib/opensolaris')
-rw-r--r--cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c b/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c
index 1c5f644..63d4d1e 100644
--- a/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c
+++ b/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c
@@ -675,6 +675,10 @@ tdesc_array_create(dwarf_t *dw, Dwarf_Die dim, tdesc_t *arrtdp,
ar->ad_nelems = uval + 1;
else if (die_signed(dw, dim, DW_AT_upper_bound, &sval, 0))
ar->ad_nelems = sval + 1;
+ else if (die_unsigned(dw, dim, DW_AT_count, &uval, 0))
+ ar->ad_nelems = uval;
+ else if (die_signed(dw, dim, DW_AT_count, &sval, 0))
+ ar->ad_nelems = sval;
else
ar->ad_nelems = 0;
OpenPOWER on IntegriCloud