Add some missing DWARF constants and readelf support for them.
authorRoland McGrath <roland@redhat.com>
Tue, 22 Jun 2010 07:10:54 +0000 (00:10 -0700)
committerRoland McGrath <roland@redhat.com>
Tue, 22 Jun 2010 07:10:54 +0000 (00:10 -0700)
libdw/ChangeLog
libdw/dwarf.h
src/ChangeLog
src/readelf.c

index dff21fa..c87634f 100644 (file)
@@ -1,5 +1,7 @@
 2010-06-21  Roland McGrath  <roland@redhat.com>
 
+       * dwarf.h: Add DW_TAG_GNU_* constants.
+
        * memory-access.h (get_sleb128_rest_return): Fix sign extension for
        10-byte case.
 
index fa7635c..dbf56e9 100644 (file)
@@ -122,6 +122,13 @@ enum
     DW_TAG_function_template = 0x4102,
     DW_TAG_class_template = 0x4103,
 
+    DW_TAG_GNU_BINCL = 0x4104,
+    DW_TAG_GNU_EINCL = 0x4105,
+
+    DW_TAG_GNU_template_template_param = 0x4106,
+    DW_TAG_GNU_template_parameter_pack = 0x4107,
+    DW_TAG_GNU_formal_parameter_pack = 0x4108,
+
     DW_TAG_hi_user = 0xffff
   };
 
index bcb9729..e7cbffa 100644 (file)
@@ -1,6 +1,8 @@
 2010-06-21  Roland McGrath  <roland@redhat.com>
 
        * readelf.c (dwarf_tag_string): Handle new v4 tags.
+       (dwarf_attr_string): Add new attributes.
+       (dwarf_tag_string): Handle DW_TAG_GNU_*.
 
        * readelf.c (print_ops): Use 64-bit types for LEB128 operands.
        (print_cfa_program): Likewise.
index 76b4fe4..08b85ab 100644 (file)
@@ -3259,6 +3259,26 @@ dwarf_tag_string (unsigned int tag)
        result = "class_template";
        break;
 
+      case DW_TAG_GNU_BINCL:
+       result = "GNU_BINCL";
+       break;
+
+      case DW_TAG_GNU_EINCL:
+       result = "GNU_EINCL";
+       break;
+
+      case DW_TAG_GNU_template_template_param:
+       result = "GNU_template_template_param";
+       break;
+
+      case DW_TAG_GNU_template_parameter_pack:
+       result = "GNU_template_parameter_pack";
+       break;
+
+      case DW_TAG_GNU_formal_parameter_pack:
+       result = "GNU_formal_parameter_pack";
+       break;
+
       default:
        if (tag < DW_TAG_lo_user)
          snprintf (buf, sizeof buf, gettext ("unknown tag %hx"), tag);
@@ -3366,6 +3386,12 @@ dwarf_attr_string (unsigned int attrnum)
       [DW_AT_elemental] = "elemental",
       [DW_AT_pure] = "pure",
       [DW_AT_recursive] = "recursive",
+      [DW_AT_signature] = "signature",
+      [DW_AT_main_subprogram] = "main_subprogram",
+      [DW_AT_data_bit_offset] = "data_bit_offset",
+      [DW_AT_const_expr] = "const_expr",
+      [DW_AT_enum_class] = "enum_class",
+      [DW_AT_linkage_name] = "linkage_name",
     };
   const unsigned int nknown_attrs = (sizeof (known_attrs)
                                     / sizeof (known_attrs[0]));