+2009-02-26 Roland McGrath <roland@redhat.com>
+
+ * c++/dwarf (dwarf::attr_value): Add _m_tag private member.
+ (dwarf::attr_value, dwarf::attribute): Update initializers.
+ (dwarf::raw_attributes::const_iterator): Update caller.
+ * c++/values.cc (attr_value::what_space): Use it.
+
2009-02-01 Roland McGrath <roland@redhat.com>
* c++/edit-values.cc: New file.
{
if (unlikely (_m_offset == 1))
throw std::runtime_error ("dereferencing end iterator");
- return attribute (_m_attr);
+ return attribute (_m_die, _m_attr);
}
};
inline const_iterator begin () const
friend class location_attr;
friend class range_list;
private:
+ const int _m_tag;
::Dwarf_Attribute _m_attr;
inline ::Dwarf_Attribute *thisattr () const
{
return const_cast< ::Dwarf_Attribute *> (&_m_attr);
}
- attr_value (const ::Dwarf_Attribute &attr) : _m_attr (attr) {}
+ attr_value (int tag, const ::Dwarf_Attribute &attr)
+ : _m_tag (tag), _m_attr (attr) {}
inline bool same (const attr_value &other) const
{
}
};
- attribute (const ::Dwarf_Attribute &attr)
- : first (*this), second (attr) {}
+ attribute (const debug_info_entry &die, const ::Dwarf_Attribute &attr)
+ : first (*this), second (die.tag (), attr) {}
public:
lhs first;
throw std::runtime_error ("XXX bad form");
}
- unsigned int expected = expected_value_space
- (dwarf_whatattr (thisattr ()), 0); // XXX need tag!
-
+ unsigned int expected = expected_value_space (dwarf_whatattr (thisattr ()),
+ _m_tag);
if (unlikely ((expected & possible) == 0))
{
if (expected == 0 && possible == (VS(unit_reference) | VS(reference)))