summaryrefslogtreecommitdiff
path: root/libdw/c++/dwarf
diff options
context:
space:
mode:
Diffstat (limited to 'libdw/c++/dwarf')
-rw-r--r--libdw/c++/dwarf99
1 files changed, 55 insertions, 44 deletions
diff --git a/libdw/c++/dwarf b/libdw/c++/dwarf
index fab89611..cf24cc20 100644
--- a/libdw/c++/dwarf
+++ b/libdw/c++/dwarf
@@ -440,14 +440,14 @@ namespace elfutils
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
{
@@ -501,19 +501,21 @@ namespace elfutils
// 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
{
@@ -618,18 +620,22 @@ namespace elfutils
// 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
@@ -640,7 +646,7 @@ namespace elfutils
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.
@@ -733,29 +739,32 @@ namespace elfutils
// 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 ()
{
@@ -763,7 +772,7 @@ namespace elfutils
{
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. */
@@ -846,11 +855,11 @@ namespace elfutils
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>
@@ -872,20 +881,19 @@ namespace elfutils
}
// 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:
@@ -895,8 +903,9 @@ namespace elfutils
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;
@@ -1100,11 +1109,13 @@ namespace elfutils
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 ();
@@ -1837,7 +1848,7 @@ namespace elfutils
// 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
@@ -2315,28 +2326,28 @@ namespace elfutils
}
};
- 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