From: Petr Machata Date: Fri, 25 Feb 2011 14:06:14 +0000 (+0100) Subject: Use dwarf::{attributes,tags}::name instead of dwarf_{attr,tag}_string X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f84b6d55c938acc6cdbd1bf7af1b3c51396effb2;p=thirdparty%2Felfutils.git Use dwarf::{attributes,tags}::name instead of dwarf_{attr,tag}_string --- diff --git a/dwarflint/check_dups_abstract_origin.cc b/dwarflint/check_dups_abstract_origin.cc index e9a6dee57..58db89f1b 100644 --- a/dwarflint/check_dups_abstract_origin.cc +++ b/dwarflint/check_dups_abstract_origin.cc @@ -1,5 +1,5 @@ /* Pedantic checking of DWARF files. - Copyright (C) 2009, 2010 Red Hat, Inc. + Copyright (C) 2009, 2010, 2011 Red Hat, Inc. This file is part of Red Hat elfutils. Red Hat elfutils is free software; you can redistribute it and/or modify @@ -79,8 +79,8 @@ namespace if ((at2 = m.find ((*at).first)) != m.end ()) wr_message (to_where (die), cat (mc_impact_3, mc_acc_bloat, mc_die_rel)) - << "Attribute " << dwarf_attr_string (at2->first) - << " is duplicated at " << dwarf_attr_string (attr.first) + << "Attribute " << dwarf::attributes::name (at2->first) + << " is duplicated at " << dwarf::attributes::name (attr.first) << " (" << pri::ref (referree) << ")" << (at2->second == (*at).second ? "." : " with different value.") diff --git a/dwarflint/check_expected_trees.cc b/dwarflint/check_expected_trees.cc index 9c9329c1a..955cf8d17 100644 --- a/dwarflint/check_expected_trees.cc +++ b/dwarflint/check_expected_trees.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2009,2010 Red Hat, Inc. + Copyright (C) 2009,2010,2011 Red Hat, Inc. This file is part of Red Hat elfutils. Red Hat elfutils is free software; you can redistribute it and/or modify @@ -159,8 +159,8 @@ check_expected_trees::check_expected_trees (checkstack &stack, dwarflint &lint) kt = expect.find (name); if (kt == expect.end ()) wr_message (where, cat (mc_impact_3, mc_info)) - << ": DIE \"" << dwarf_tag_string (parent_tag) - << "\" has attribute \"" << dwarf_attr_string (name) + << ": DIE \"" << dwarf::tags::name (parent_tag) + << "\" has attribute \"" << dwarf::attributes::name (name) << "\", which is not expected." << std::endl; try @@ -169,8 +169,8 @@ check_expected_trees::check_expected_trees (checkstack &stack, dwarflint &lint) dwarf::value_space vs = (*jt).second.what_space (); if ((exp_vs & (1U << vs)) == 0) wr_message (where, cat (mc_impact_3, mc_info)) - << ": in DIE \"" << dwarf_tag_string (parent_tag) - << "\", attribute \"" << dwarf_attr_string (name) + << ": in DIE \"" << dwarf::tags::name (parent_tag) + << "\", attribute \"" << dwarf::attributes::name (name) << "\" has value of unexpected type \"" << vs << "\"." << std::endl; } @@ -178,9 +178,10 @@ check_expected_trees::check_expected_trees (checkstack &stack, dwarflint &lint) catch (...) { wr_message (where, cat (mc_impact_4, mc_info, mc_error)) - << ": in DIE \"" << dwarf_tag_string (parent_tag) + << ": in DIE \"" << dwarf::tags::name (parent_tag) << "\", couldn't obtain type of attribute \"" - << dwarf_attr_string (name) << "\"." << std::endl; + << dwarf::attributes::name (name) << "\"." + << std::endl; } } diff --git a/dwarflint/pri.cc b/dwarflint/pri.cc index fb9a9517b..09e30257a 100644 --- a/dwarflint/pri.cc +++ b/dwarflint/pri.cc @@ -1,5 +1,5 @@ /* Pedantic checking of DWARF files - Copyright (C) 2008,2009,2010 Red Hat, Inc. + Copyright (C) 2008,2009,2010,2011 Red Hat, Inc. This file is part of Red Hat elfutils. Red Hat elfutils is free software; you can redistribute it and/or modify @@ -23,9 +23,14 @@ Network licensing program, please visit www.openinventionnetwork.com . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "../src/dwarfstrings.h" #include "pri.hh" #include +#include "c++/dwarf" std::ostream & pri::operator << (std::ostream &os, pri::pribase const &obj) @@ -34,7 +39,7 @@ pri::operator << (std::ostream &os, pri::pribase const &obj) } pri::attr::attr (int attr_name) - : pribase (dwarf_attr_string (attr_name)) + : pribase (elfutils::dwarf::attributes::name (attr_name)) {} pri::form::form (int attr_form) @@ -42,7 +47,7 @@ pri::form::form (int attr_form) {} pri::tag::tag (int die_tag) - : pribase (dwarf_tag_string (die_tag)) + : pribase (elfutils::dwarf::tags::name (die_tag)) {} pri::locexpr_opcode::locexpr_opcode (int opcode)