Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Mar 2013 19:21:36 +0000 (UTC)
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r248802 - in head/contrib/binutils: bfd binutils
Message-ID:  <201303271921.r2RJLaXR025602@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dim
Date: Wed Mar 27 19:21:36 2013
New Revision: 248802
URL: http://svnweb.freebsd.org/changeset/base/248802

Log:
  Similar to r239870 and r239872, teach the other binutils tools about the
  DW_FORM_flag_present dwarf attribute, so they do not print errors or
  warnings on files that contain it.  (This attribute can be emitted by
  newer versions of clang and gcc.)
  
  MFC after:	1 week

Modified:
  head/contrib/binutils/bfd/dwarf2.c
  head/contrib/binutils/binutils/dwarf.c

Modified: head/contrib/binutils/bfd/dwarf2.c
==============================================================================
--- head/contrib/binutils/bfd/dwarf2.c	Wed Mar 27 19:07:02 2013	(r248801)
+++ head/contrib/binutils/bfd/dwarf2.c	Wed Mar 27 19:21:36 2013	(r248802)
@@ -633,6 +633,9 @@ read_attribute_value (struct attribute *
       attr->u.val = read_1_byte (abfd, info_ptr);
       info_ptr += 1;
       break;
+    case DW_FORM_flag_present:
+      attr->u.val = 1;
+      break;
     case DW_FORM_sdata:
       attr->u.sval = read_signed_leb128 (abfd, info_ptr, &bytes_read);
       info_ptr += bytes_read;

Modified: head/contrib/binutils/binutils/dwarf.c
==============================================================================
--- head/contrib/binutils/binutils/dwarf.c	Wed Mar 27 19:07:02 2013	(r248801)
+++ head/contrib/binutils/binutils/dwarf.c	Wed Mar 27 19:21:36 2013	(r248802)
@@ -557,6 +557,7 @@ get_FORM_name (unsigned long form)
     case DW_FORM_ref8:		return "DW_FORM_ref8";
     case DW_FORM_ref_udata:	return "DW_FORM_ref_udata";
     case DW_FORM_indirect:	return "DW_FORM_indirect";
+    case DW_FORM_flag_present:	return "DW_FORM_flag_present";
     default:
       {
 	static char buffer[100];
@@ -969,6 +970,10 @@ read_and_display_attr_value (unsigned lo
       data += offset_size;
       break;
 
+    case DW_FORM_flag_present:
+      uvalue = 1;
+      break;
+
     case DW_FORM_ref1:
     case DW_FORM_flag:
     case DW_FORM_data1:
@@ -1030,6 +1035,7 @@ read_and_display_attr_value (unsigned lo
 	printf (" %#lx", uvalue);
       break;
 
+    case DW_FORM_flag_present:
     case DW_FORM_flag:
     case DW_FORM_data1:
     case DW_FORM_data2:



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