From: Mark Wielaard Date: Sun, 3 Apr 2011 18:14:50 +0000 (+0200) Subject: Add minimal support for DW_TAG_GNU_template. X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=08d9e8df629fc5553af7df32e82a56a7542ad03b;p=thirdparty%2Felfutils.git Add minimal support for DW_TAG_GNU_template. 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 --- diff --git a/dwarflint/dwarf_gnu.cc b/dwarflint/dwarf_gnu.cc index b70a6d2d5..2d29f1184 100644 --- a/dwarflint/dwarf_gnu.cc +++ b/dwarflint/dwarf_gnu.cc @@ -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 diff --git a/dwarflint/expected-at.cc b/dwarflint/expected-at.cc index 70f139088..7a433c722 100644 --- a/dwarflint/expected-at.cc +++ b/dwarflint/expected-at.cc @@ -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) + ; + } diff --git a/libdw/c++/dwarf-knowledge.cc b/libdw/c++/dwarf-knowledge.cc index c38a1691d..c49e6189b 100644 --- a/libdw/c++/dwarf-knowledge.cc +++ b/libdw/c++/dwarf-knowledge.cc @@ -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: