]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
Use dwarf::{attributes,tags}::name instead of dwarf_{attr,tag}_string
authorPetr Machata <pmachata@redhat.com>
Fri, 25 Feb 2011 14:06:14 +0000 (15:06 +0100)
committerPetr Machata <pmachata@redhat.com>
Fri, 25 Feb 2011 14:06:14 +0000 (15:06 +0100)
dwarflint/check_dups_abstract_origin.cc
dwarflint/check_expected_trees.cc
dwarflint/pri.cc

index e9a6dee5711af8b52feea71c8cb4876e95ef57df..58db89f1b644fc4ac4f5c1eab4d4670e4c620b1e 100644 (file)
@@ -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.")
index 9c9329c1aa735cc704efe87a21b4e83aeea1b7f4..955cf8d17925f0f04c032e0ea0446db8157a7d68 100644 (file)
@@ -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;
                }
            }
 
index fb9a9517b2c0e604eeabadf584bd2b4151b0e723..09e30257afed42fd332b1970f66a3136c86f2e72 100644 (file)
@@ -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
    Network licensing program, please visit www.openinventionnetwork.com
    <http://www.openinventionnetwork.com>.  */
 
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
 #include "../src/dwarfstrings.h"
 #include "pri.hh"
 #include <sstream>
+#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)