Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 24 Oct 2015 03:14:36 +0000 (UTC)
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r289866 - head/cddl/contrib/opensolaris/tools/ctf/cvt
Message-ID:  <201510240314.t9O3EaH2026899@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201510240314.t9O3EaH2026899>