#include <cassert>
#include <algorithm>
#include "../libdw/dwarf.h"
+#include "../libdw/c++/dwarf"
#include "messages.hh"
#include "dwarf_version.hh"
// error the second time now.
wr_error (where)
<< "can't read value of attribute "
- << pri::attr (it->name) << '.' << std::endl;
+ << elfutils::dwarf::attributes::name (it->name)
+ << '.' << std::endl;
return -1;
}
if (storclass == sc_block)
#include "expected.hh"
#include "../src/dwarfstrings.h"
#include "../libdw/c++/dwarf-knowledge.cc"
-#include "pri.hh"
#include "messages.hh"
using elfutils::dwarf;
= expect.begin (); jt != expect.end (); ++jt)
{
std::set <int>::iterator kt = attributes.find (jt->first);
+ char const *what = NULL;
if (kt == attributes.end ())
switch (jt->second)
{
case opt_required:
- wr_message (where, cat (mc_impact_4, mc_info))
- << pri::tag (parent_tag) << " lacks required attribute "
- << pri::attr (jt->first) << '.' << std::endl;
- break;
+ what = " lacks required attribute ";
+ // FALL_THROUGH
case opt_expected:
+ if (what == NULL)
+ what = " should contain attribute ";
wr_message (where, cat (mc_impact_2, mc_info))
- << pri::tag (parent_tag) << " should contain attribute "
- << pri::attr (jt->first) << '.' << std::endl;
+ << elfutils::dwarf::tags::name (parent_tag) << what
+ << elfutils::dwarf::attributes::name (jt->first) << '.'
+ << std::endl;
+ break;
case opt_optional:
break;
/* Check whether PC ranges reported at DIE fall into the containing scope.
- 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
{
runoff = true;
wr_error (wh)
- << "attribute `" << pri::attr ((*at).first)
+ << "attribute `"
+ << elfutils::dwarf::attributes::name ((*at).first)
<< "': PC range " << pri::range (start, end)
<< " outside containing scope." << std::endl;
}
#include "dwarf_mips.hh"
#include "check_debug_info.hh"
#include "pri.hh"
+#include "c++/dwarf"
#include "../libdw/dwarf.h"
#include <map>
std::ostream &
operator << (std::ostream &os, attribute const &obj)
{
- return os << pri::attr (obj.name ());
+ return os << elfutils::dwarf::attributes::name (obj.name ());
}
/*
- Copyright (C) 2010 Red Hat, Inc.
+ Copyright (C) 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
{
auto const &d = *sit;
std::cerr << pad << pri::ref (d) << " "
- << pri::tag (d.tag ()) << std::endl;
+ << elfutils::dwarf::tags::name (d.tag ()) << std::endl;
for (auto atit = d.attributes ().begin ();
atit != d.attributes ().end (); ++atit)
{
return os << obj.m_s;
}
-pri::attr::attr (int attr_name)
- : pribase (elfutils::dwarf::attributes::name (attr_name))
-{}
-
pri::form::form (int attr_form)
: pribase (dwarf_form_string (attr_form))
{}
-pri::tag::tag (int die_tag)
- : pribase (elfutils::dwarf::tags::name (die_tag))
-{}
-
pri::locexpr_opcode::locexpr_opcode (int opcode)
: pribase (dwarf_locexpr_opcode_string (opcode))
{}
/* 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
{}
};
- struct attr
- : public pribase
- {
- attr (int attr_name);
- };
-
struct form
: public pribase
{
form (int attr_form);
};
- struct tag
- : public pribase
- {
- tag (int tag);
- };
-
struct locexpr_opcode
: public pribase
{