Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Aug 2012 18:37:11 +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: r239870 - in head/contrib: binutils/include/elf gdb/gdb
Message-ID:  <201208291837.q7TIbB6W094456@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dim
Date: Wed Aug 29 18:37:10 2012
New Revision: 239870
URL: http://svn.freebsd.org/changeset/base/239870

Log:
  Teach gdb about the DW_FORM_flag_present dwarf attribute, so it doesn't
  error out on files that contain it.  (This attribute can be emitted by
  newer versions of clang.)
  
  MFC after:	2 weeks

Modified:
  head/contrib/binutils/include/elf/dwarf2.h
  head/contrib/gdb/gdb/dwarf2read.c

Modified: head/contrib/binutils/include/elf/dwarf2.h
==============================================================================
--- head/contrib/binutils/include/elf/dwarf2.h	Wed Aug 29 18:22:52 2012	(r239869)
+++ head/contrib/binutils/include/elf/dwarf2.h	Wed Aug 29 18:37:10 2012	(r239870)
@@ -238,7 +238,8 @@ enum dwarf_form
     DW_FORM_ref4 = 0x13,
     DW_FORM_ref8 = 0x14,
     DW_FORM_ref_udata = 0x15,
-    DW_FORM_indirect = 0x16
+    DW_FORM_indirect = 0x16,
+    DW_FORM_flag_present = 0x19
   };
 
 /* Attribute names and codes.  */

Modified: head/contrib/gdb/gdb/dwarf2read.c
==============================================================================
--- head/contrib/gdb/gdb/dwarf2read.c	Wed Aug 29 18:22:52 2012	(r239869)
+++ head/contrib/gdb/gdb/dwarf2read.c	Wed Aug 29 18:37:10 2012	(r239870)
@@ -4604,6 +4604,9 @@ read_attribute_value (struct attribute *
       DW_UNSND (attr) = read_1_byte (abfd, info_ptr);
       info_ptr += 1;
       break;
+    case DW_FORM_flag_present:
+      DW_UNSND (attr) = 1;
+      break;
     case DW_FORM_sdata:
       DW_SND (attr) = read_signed_leb128 (abfd, info_ptr, &bytes_read);
       info_ptr += bytes_read;
@@ -7226,6 +7229,9 @@ dump_die (struct die_info *die)
 	  else
 	    fprintf_unfiltered (gdb_stderr, "flag: FALSE");
 	  break;
+	case DW_FORM_flag_present:
+	  fprintf_unfiltered (gdb_stderr, "flag: TRUE");
+	  break;
 	case DW_FORM_indirect:
 	  /* the reader will have reduced the indirect form to
 	     the "base form" so this form should not occur */



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