svn commit: r289866 - head/cddl/contrib/opensolaris/tools/ctf/cvt
Mark Johnston
markj at FreeBSD.org
Sat Oct 24 03:14:37 UTC 2015
Author: markj
Date: Sat Oct 24 03:14:36 2015
New Revision: 289866
URL: https://svnweb.freebsd.org/changeset/base/289866
Log:
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
MFC after: 1 week
Modified:
head/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c
Modified: head/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c
==============================================================================
--- head/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c Sat Oct 24 03:01:47 2015 (r289865)
+++ head/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c Sat Oct 24 03:14:36 2015 (r289866)
@@ -683,6 +683,10 @@ tdesc_array_create(dwarf_t *dw, Dwarf_Di
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;
More information about the svn-src-all
mailing list