debug_info_entry (const debug_info_entry &die) : _m_die (die._m_die) {}
// Containers, see class definitions below.
- class raw_children;
- inline raw_children raw_children () const;
- class raw_attributes;
- raw_attributes raw_attributes () const;
- class children;
- inline children children () const;
- class attributes;
- attributes attributes () const;
+ class raw_children_type;
+ inline raw_children_type raw_children () const;
+ class raw_attributes_type;
+ raw_attributes_type raw_attributes () const;
+ class children_type;
+ inline children_type children () const;
+ class attributes_type;
+ attributes_type attributes () const;
inline int tag () const
{
// Container for raw list of child DIEs, intended to be a compatible with
// a read-only, unidirectional subset of std::list<debug_info_entry>.
- class debug_info_entry::raw_children
+ class debug_info_entry::raw_children_type
{
friend class debug_info_entry;
private:
const debug_info_entry &_m_die;
protected:
- inline raw_children (const debug_info_entry &die) : _m_die (die) {}
+ inline raw_children_type (const debug_info_entry &die) : _m_die (die) {}
public:
typedef debug_info_entry value_type;
- inline raw_children (const raw_children &c) : _m_die (c._m_die) {}
+ inline raw_children_type (const raw_children_type &c)
+ : _m_die (c._m_die)
+ {}
bool empty () const
{
// Container for list of raw attributes as (name, value) pairs,
// intended to be compatible with a read-only, unidirectional
// subset of std::list<std::pair<int, attr_value>>.
- class debug_info_entry::raw_attributes
+ class debug_info_entry::raw_attributes_type
{
friend class debug_info_entry;
private:
const debug_info_entry &_m_die;
- raw_attributes (const debug_info_entry &die) : _m_die (die) {}
+ raw_attributes_type (const debug_info_entry &die)
+ : _m_die (die)
+ {}
public:
typedef attribute value_type;
- inline raw_attributes (const raw_attributes &a) : _m_die (a._m_die) {}
+ inline raw_attributes_type (const raw_attributes_type &a)
+ : _m_die (a._m_die)
+ {}
size_t size () const;
inline bool empty () const
class const_iterator
: public std::iterator<std::input_iterator_tag, attribute>
{
- friend class raw_attributes;
+ friend class raw_attributes_type;
private:
debug_info_entry _m_die;
ptrdiff_t _m_offset; // Offset for next iteration in dwarf_getattrs.
// Container for list of child DIEs, intended to be a compatible with
// a read-only, unidirectional subset of std::list<debug_info_entry>.
// Same as raw_children, but flattens DW_TAG_imported_unit children.
- class debug_info_entry::children : public debug_info_entry::raw_children
+ class debug_info_entry::children_type
+ : public debug_info_entry::raw_children_type
{
friend class debug_info_entry;
private:
- inline children (const debug_info_entry &die)
- : raw_children::raw_children (die) {}
+ inline children_type (const debug_info_entry &die)
+ : raw_children_type::raw_children_type (die) {}
public:
typedef debug_info_entry value_type;
- inline children (const children &c) : raw_children (c) {}
+ inline children_type (const children_type &c)
+ : raw_children_type (c)
+ {}
class const_iterator
: public std::iterator<std::input_iterator_tag, debug_info_entry>
{
- friend class children;
+ friend class children_type;
private:
- typedef raw_children::const_iterator raw_iterator;
+ typedef raw_children_type::const_iterator raw_iterator;
std::stack<raw_iterator> _m_stack;
- /* Push and pop until either _m_stack.top () == raw_children::end ()
+ /* Push and pop until _m_stack.top () == raw_children_type::end ()
or it's looking at a DIE other than DW_TAG_imported_unit. */
inline void jiggle ()
{
{
raw_iterator &i = _m_stack.top ();
- if (i == raw_children::end ())
+ if (i == raw_children_type::end ())
{
/* We're at the end of this raw DIE.
Pop out to the iterator on the importing unit. */
const_iterator begin () const
{
- return const_iterator (raw_children::begin ());
+ return const_iterator (raw_children_type::begin ());
}
const_iterator end () const
{
- return const_iterator (raw_children::end ());
+ return const_iterator (raw_children_type::end ());
}
template<typename other_children>
}
// Circumvent C++ namespace lookup.
- typedef class debug_info_entry::raw_attributes debug_info_entry_raw_attrs;
- typedef skipping_wrapper<debug_info_entry_raw_attrs,
- attribute, attribute, skip_sibling>
+ typedef class debug_info_entry::raw_attributes_type die_raw_attrs;
+ typedef skipping_wrapper<die_raw_attrs, attribute, attribute, skip_sibling>
attributes_base;
public:
// Container for attributes, indexed by name, intended to be compatible
// with a read-only subset of std::unordered_map<int, attr_value>.
// This excludes DW_AT_sibling.
- class debug_info_entry::attributes : public attributes_base
+ class debug_info_entry::attributes_type : public attributes_base
{
friend class dwarf;
private:
- inline attributes (const class raw_attributes &raw)
+ inline attributes_type (const raw_attributes_type &raw)
: attributes_base (raw) {}
public:
static const bool ordered = false;
- inline attributes (const class attributes &a)
- : attributes_base (a) {}
+ inline attributes_type (const attributes_type &a)
+ : attributes_base (a)
+ {}
typedef attributes_base::const_iterator const_iterator;
inline std::string to_string () const;
// Return an iterator on which * will yield the referent debug_info_entry.
- inline debug_info_entry::raw_children::const_iterator reference () const
+ inline debug_info_entry::raw_children_type::const_iterator
+ reference () const
{
- return debug_info_entry::raw_children::const_iterator (thisattr ());
+ return (debug_info_entry::raw_children_type::const_iterator
+ (thisattr ()));
}
- inline debug_info_entry::raw_children::const_iterator
+ inline debug_info_entry::raw_children_type::const_iterator
unit_reference () const
{
return reference ();
// This describes one attribute, equivalent to pair<const int, attr_value>.
class attribute
{
- friend class debug_info_entry::raw_attributes::const_iterator;
+ friend class debug_info_entry::raw_attributes_type::const_iterator;
friend class attr_value;
private:
inline ::Dwarf_Attribute *thisattr () const
}
};
- inline class dwarf::debug_info_entry::raw_children
+ inline class dwarf::debug_info_entry::raw_children_type
dwarf::debug_info_entry::raw_children () const
{
- return raw_children::raw_children (*this);
+ return raw_children_type::raw_children_type (*this);
}
- inline class dwarf::debug_info_entry::children
+ inline class dwarf::debug_info_entry::children_type
dwarf::debug_info_entry::children () const
{
- return children::children (*this);
+ return children_type::children_type (*this);
}
- inline class dwarf::debug_info_entry::raw_attributes
+ inline class dwarf::debug_info_entry::raw_attributes_type
dwarf::debug_info_entry::raw_attributes () const
{
- return raw_attributes::raw_attributes (*this);
+ return raw_attributes_type::raw_attributes_type (*this);
}
- inline class dwarf::debug_info_entry::attributes
+ inline class dwarf::debug_info_entry::attributes_type
dwarf::debug_info_entry::attributes () const
{
- return attributes::attributes (raw_attributes ());
+ return attributes_type::attributes_type (raw_attributes ());
}
inline dwarf::location_attr::const_iterator
protected:
typedef typename dwarf1::compile_units::const_iterator cu1;
typedef typename dwarf2::compile_units::const_iterator cu2;
- typedef typename dwarf1::debug_info_entry::children::const_iterator die1;
- typedef typename dwarf2::debug_info_entry::children::const_iterator die2;
- typedef typename dwarf1::debug_info_entry::attributes::const_iterator attr1;
- typedef typename dwarf2::debug_info_entry::attributes::const_iterator attr2;
+ typedef typename dwarf1::debug_info_entry dwarf1_die;
+ typedef typename dwarf2::debug_info_entry dwarf2_die;
+ typedef typename dwarf1_die::children_type::const_iterator die1;
+ typedef typename dwarf2_die::children_type::const_iterator die2;
+ typedef typename dwarf1_die::attributes_type::const_iterator attr1;
+ typedef typename dwarf2_die::attributes_type::const_iterator attr2;
public:
inline void start_walk (const cu1 &a, const cu2 &b)
o.insert (std::make_pair ((*i).first, i));
}
- typedef typename dwarf1::debug_info_entry::attributes attributes1;
- typedef typename dwarf2::debug_info_entry::attributes attributes2;
+ typedef typename dwarf1::debug_info_entry::attributes_type attributes1;
+ typedef typename dwarf2::debug_info_entry::attributes_type attributes2;
typedef typename attributes1::const_iterator ait1;
typedef typename attributes2::const_iterator ait2;
typedef std::map<int, ait1> ait1_map;
return false;
}
- typedef typename dwarf1::debug_info_entry::children children1;
- typedef typename dwarf2::debug_info_entry::children children2;
+ typedef typename dwarf1::debug_info_entry::children_type children1;
+ typedef typename dwarf2::debug_info_entry::children_type children2;
typedef typename children1::const_iterator cit1;
typedef typename children2::const_iterator cit2;
struct die_matcher
{
public:
- class children : public std::list<debug_info_entry>
+ class children_type : public std::list<debug_info_entry>
{
friend class debug_info_entry;
private:
- children () {}
+ children_type () {}
template<typename childrens>
- children (const childrens &other)
+ children_type (const childrens &other)
: std::list<debug_info_entry> (other.begin (), other.end ()) {}
public:
typedef debug_info_entry value_type;
};
- class attributes : public std::map<int, attr_value>
+ class attributes_type : public std::map<int, attr_value>
{
friend class debug_info_entry;
private:
typedef std::map<int, attr_value> base_type;
- attributes () {}
+ attributes_type () {}
template<typename attrs>
- attributes (const attrs &other)
+ attributes_type (const attrs &other)
: std::map<int, attr_value> (other.begin (), other.end ()) {}
public:
private:
const int _m_tag;
- attributes _m_attributes;
- children _m_children;
+ attributes_type _m_attributes;
+ children_type _m_children;
public:
debug_info_entry (int t) : _m_tag (t)
return !_m_children.empty ();
}
- inline class children &children ()
+ inline children_type &children ()
{
return _m_children;
}
- inline const class children &children () const
+ inline const children_type &children () const
{
return _m_children;
}
- inline class attributes &attributes ()
+ inline attributes_type &attributes ()
{
return _m_attributes;
}
- inline const class attributes &attributes () const
+ inline const attributes_type &attributes () const
{
return _m_attributes;
}
}
};
- typedef debug_info_entry::attributes::value_type attribute;
+ typedef debug_info_entry::attributes_type::value_type attribute;
class compile_unit : public debug_info_entry
{
struct value_reference : public value_dispatch
{
- debug_info_entry::children::iterator ref;
- value_reference (const debug_info_entry::children::iterator &i)
+ debug_info_entry::children_type::iterator ref;
+ value_reference (const debug_info_entry::children_type::iterator &i)
: ref (i) {}
template<typename iter> // XXX dummy
return variant<value_address> ().addr;
}
- inline debug_info_entry::children::iterator reference () const
+ inline debug_info_entry::children_type::iterator reference () const
{
return variant<value_reference> ().ref;
}