]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
Add minimal support for DW_TAG_GNU_template.
authorMark Wielaard <mjw@redhat.com>
Sun, 3 Apr 2011 18:14:50 +0000 (20:14 +0200)
committerMark Wielaard <mjw@redhat.com>
Sun, 3 Apr 2011 18:14:50 +0000 (20:14 +0200)
http://gcc.gnu.org/wiki/TemplateParmsDwarf describes
DW_TAG_GNU_template_template_param, DW_TAG_GNU_template_parameter_pack,
DW_TAG_GNU_formal_parameter_pack and DW_AT_GNU_template_name.
Added to libdw/c++/dwarf-knowledge.cc, dwarflint/expected-at.cc and
dwarflint/dwarf_gnu.cc

dwarflint/dwarf_gnu.cc
dwarflint/expected-at.cc
libdw/c++/dwarf-knowledge.cc

index b70a6d2d5dd4e59f495fa7d0df904155bf925d32..2d29f118405af8bd3fdec336d066787c0da45916 100644 (file)
@@ -68,7 +68,8 @@ namespace
       // http://gcc.gnu.org/wiki/DwarfSeparateTypeInfo
       add (const_attribute (DW_AT_GNU_odr_signature));
 
-      add (string_attribute (DW_AT_GNU_template_name)); // xxx ???
+      // http://gcc.gnu.org/wiki/TemplateParmsDwarf
+      add (string_attribute (DW_AT_GNU_template_name));
 
       // GNU extensions for representation of call sites
       // http://www.dwarfstd.org/ShowIssue.php?issue=100909.2
index 70f139088b71a27ace052fe183225ab5795d5905..7a433c7221518205055bb8bf32ef8787ada15b09 100644 (file)
@@ -788,4 +788,23 @@ expected_at_map::expected_at_map ()
     .optional (DW_AT_sibling)
     .optional (DW_AT_type)
     ;
+
+  // http://gcc.gnu.org/wiki/TemplateParmsDwarf
+  m_map [DW_TAG_GNU_template_template_param]
+    .required (DW_AT_name)
+    .required (DW_AT_GNU_template_name)
+    ;
+
+  m_map [DW_TAG_GNU_template_parameter_pack]
+    .optional (at_set_decl)
+    .optional (DW_AT_name)
+    .optional (DW_AT_sibling)
+    ;
+
+  m_map [DW_TAG_GNU_formal_parameter_pack]
+    .optional (at_set_decl)
+    .optional (DW_AT_name)
+    .optional (DW_AT_sibling)
+    ;
+
 }
index c38a1691d033acb8bedd0b846c2594e6040a6eb4..c49e6189bfdf73a45f2ff24ff2e46ca68cf7d1a6 100644 (file)
@@ -162,6 +162,7 @@ expected_value_space (int attr, int tag)
 
     case DW_AT_linkage_name:
     case DW_AT_MIPS_linkage_name:
+    case DW_AT_GNU_template_name:
       return VS(identifier);
 
     case DW_AT_GNU_odr_signature: