typedef typename T::debug_info_entry::children_type::const_iterator die_it_t;
typedef std::vector <std::pair <die_it_t, die_it_t> > die_it_stack_t;
- typename T::compile_units::const_iterator _m_cu_it, _m_cu_it_end;
+ typename T::compile_units_type::const_iterator _m_cu_it, _m_cu_it_end;
die_it_t _m_die_it, _m_die_it_end;
die_it_stack_t _m_die_it_stack;
bool _m_atend;
}
} recursively_validate;
- class dwarf::compile_units const &cus = dw.compile_units ();
- for (dwarf::compile_units::const_iterator it = cus.begin ();
+ class dwarf::compile_units_type const &cus = dw.compile_units ();
+ for (dwarf::compile_units_type::const_iterator it = cus.begin ();
it != cus.end (); ++it)
recursively_validate (*it, *it);
}
{
try
{
- class dwarf::compile_units const &cus = dw.compile_units ();
+ class dwarf::compile_units_type const &cus = dw.compile_units ();
ranges_t r;
r.push_back (std::make_pair (0, -1));
where wh = WHERE (sec_info, NULL);
- for (dwarf::compile_units::const_iterator it = cus.begin ();
+ for (dwarf::compile_units_type::const_iterator it = cus.begin ();
it != cus.end (); ++it)
recursively_validate (*it, *it, r, wh);
}
// Container for raw CUs in file order, intended to be compatible
// with a read-only subset of std::list<compile_unit>.
- class raw_compile_units
+ class raw_compile_units_type
{
friend class dwarf;
private:
const dwarf &_m_file;
- raw_compile_units (const dwarf &file) : _m_file (file) {}
+ raw_compile_units_type (const dwarf &file) : _m_file (file) {}
public:
typedef compile_unit value_type;
- inline raw_compile_units (const raw_compile_units &u)
+ inline raw_compile_units_type (const raw_compile_units_type &u)
: _m_file (u._m_file) {}
class const_iterator
: public std::iterator<std::input_iterator_tag, compile_unit>
{
- friend class raw_compile_units;
+ friend class raw_compile_units_type;
private:
debug_info_entry _m_die;
const dwarf *_m_file; // XXX
return const_iterator ();
}
};
- inline raw_compile_units raw_compile_units () const
+ inline raw_compile_units_type raw_compile_units () const
{
- return raw_compile_units::raw_compile_units (*this);
+ return raw_compile_units_type::raw_compile_units_type (*this);
}
private:
}
}
- typedef skipping_wrapper<class raw_compile_units,
+ typedef skipping_wrapper<class raw_compile_units_type,
compile_unit, compile_unit,
skip_partial_unit> compile_units_base;
// Container for logical CUs in file order, intended to be compatible
// with a read-only subset of std::list<compile_unit>.
- class compile_units : public compile_units_base
+ class compile_units_type : public compile_units_base
{
friend class dwarf;
private:
- compile_units (class raw_compile_units raw) : compile_units_base (raw) {}
+ compile_units_type (class raw_compile_units_type raw) : compile_units_base (raw) {}
public:
typedef compile_unit value_type;
- compile_units (const compile_units &u) : compile_units_base (u) {}
+ compile_units_type (const compile_units_type &u) : compile_units_base (u) {}
template<typename units>
bool operator== (const units &other) const
return !(*this == other);
}
};
- inline class compile_units compile_units () const
+ inline class compile_units_type compile_units () const
{
- return compile_units::compile_units (raw_compile_units ());
+ return compile_units_type::compile_units_type (raw_compile_units ());
}
private:
template<class dwarf1, class dwarf2>
struct dwarf_tracker_base
{
- typedef typename dwarf1::compile_units::const_iterator cu1;
- typedef typename dwarf2::compile_units::const_iterator cu2;
+ typedef typename dwarf1::compile_units_type::const_iterator cu1;
+ typedef typename dwarf2::compile_units_type::const_iterator cu2;
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;
return match (a.compile_units (), b.compile_units ());
}
- typedef typename dwarf1::compile_units compile_units1;
- typedef typename dwarf2::compile_units compile_units2;
- typedef typename dwarf1::compile_units::const_iterator cu1_it;
- typedef typename dwarf2::compile_units::const_iterator cu2_it;
+ typedef typename dwarf1::compile_units_type compile_units1;
+ typedef typename dwarf2::compile_units_type compile_units2;
+ typedef typename dwarf1::compile_units_type::const_iterator cu1_it;
+ typedef typename dwarf2::compile_units_type::const_iterator cu2_it;
inline bool match (const compile_units1 &a, const compile_units2 &b)
{
cu1_it it1 = a.begin ();
do
{
if (subr::container_equal
- (it1, end1, it2, end2, MATCHER (compile_units)))
+ (it1, end1, it2, end2, MATCHER (compile_units_type)))
return true;
}
while (_m_tracker.mismatch (it1, end1, it2, end2));
// Main container anchoring all the output.
template<class impl>
- class compile_units : public std::list<typename impl::compile_unit>
+ class compile_units_type : public std::list<typename impl::compile_unit>
{
friend class subr::create_container;
// Constructor copying CUs from input container.
template<typename input, typename arg_type>
- inline compile_units (const input &other, arg_type &arg)
- : _base (subr::argify<input, compile_units, arg_type &>
+ inline compile_units_type (const input &other, arg_type &arg)
+ : _base (subr::argify<input, compile_units_type, arg_type &>
(other.begin (), arg),
- subr::argify<input, compile_units, arg_type &>
+ subr::argify<input, compile_units_type, arg_type &>
(other.end (), arg))
{}
public:
// Default constructor: an empty container, no CUs.
- inline compile_units () {}
+ inline compile_units_type () {}
template<typename other_children>
bool operator== (const other_children &other) const
class compile_unit : public impl::debug_info_entry
{
friend class subr::create_container;
- friend class impl::compile_units;
+ friend class impl::compile_units_type;
protected:
template<typename input>
typedef dwarf_data::compile_unit<dwarf_edit> compile_unit;
// Main container anchoring all the output.
- class compile_units
- : public dwarf_data::compile_units<dwarf_edit>
+ class compile_units_type
+ : public dwarf_data::compile_units_type<dwarf_edit>
{
friend class dwarf_edit;
private:
- inline compile_units (const compile_units &)
- : dwarf_data::compile_units<dwarf_edit> ()
+ inline compile_units_type (const compile_units_type &)
+ : dwarf_data::compile_units_type<dwarf_edit> ()
{
throw std::logic_error
("must copy-construct top-level dwarf_edit object instead");
// Constructor copying CUs from input container.
template<typename input, typename tracker>
- inline compile_units (const input &other, tracker &t)
+ inline compile_units_type (const input &other, tracker &t)
{
subr::create_container (this, other, t);
}
public:
// Default constructor: an empty container, no CUs.
- inline compile_units () {}
+ inline compile_units_type () {}
inline compile_unit &add_unit ()
{
};
private:
- compile_units _m_units;
+ compile_units_type _m_units;
typedef dwarf_ref_maker<dwarf_edit, dwarf_edit> edit_ref_maker;
public:
- class compile_units &compile_units ()
+ class compile_units_type &compile_units ()
{
return _m_units;
}
- const class compile_units &compile_units () const
+ const class compile_units_type &compile_units () const
{
return _m_units;
}
typedef dwarf_data::range_list range_list;
typedef dwarf_data::location_attr location_attr;
- class compile_units;
+ class compile_units_type;
class debug_info_entry;
class attr_value;
and construct a new dwarf_output object by copying using that
collector (or, equivalently, call o.compile_units ().recollect (C)
on the new collector C). */
- class compile_units
- : public dwarf_data::compile_units<dwarf_output>
+ class compile_units_type
+ : public dwarf_data::compile_units_type<dwarf_output>
{
friend class dwarf_output;
private:
- inline compile_units (const compile_units &)
- : dwarf_data::compile_units<dwarf_output> ()
+ inline compile_units_type (const compile_units_type &)
+ : dwarf_data::compile_units_type<dwarf_output> ()
{
never_copy ();
}
// Constructor copying CUs from input container.
template<typename input, typename copier>
- inline compile_units (const input &other, copier &c)
+ inline compile_units_type (const input &other, copier &c)
{
subr::create_container (this, other, c, cu_maker<input, copier>);
}
public:
// Default constructor: an empty container, no CUs.
- inline compile_units () {}
+ inline compile_units_type () {}
};
private:
- compile_units _m_units;
+ compile_units_type _m_units;
public:
- class compile_units &compile_units ()
+ class compile_units_type &compile_units ()
{
return _m_units;
}
- const class compile_units &compile_units () const
+ const class compile_units_type &compile_units () const
{
return _m_units;
}
inline dwarf_output (const input &dw, dwarf_output_collector &c)
{
copier<input> maker (c);
- _m_units.swap (compile_units::compile_units (dw.compile_units (), maker));
+ _m_units.swap (compile_units_type::compile_units_type (dw.compile_units (), maker));
}
template<typename file>
// Create a whole CU in the output.
inline void
- make_unit (const typename dw::compile_units::const_iterator &in,
- const compile_units::iterator &out)
+ make_unit (const typename dw::compile_units_type::const_iterator &in,
+ const compile_units_type::iterator &out)
{
die_info_pair *cu = unit_copier (this, *in).final_unit ();
public:
// Not really used so far, just for completeness.
- typedef subr::wrapped_input_container<class dwarf_output::compile_units,
- pending_cu> compile_units;
+ typedef subr::wrapped_input_container<class dwarf_output::compile_units_type,
+ pending_cu> compile_units_type;
class debug_info_entry
{
extern template class dwarf_data::attributes_type<dwarf_output,
dwarf_output::value>;
extern template class dwarf_data::compile_unit<dwarf_output>;
- extern template class dwarf_data::compile_units<dwarf_output>;
+ extern template class dwarf_data::compile_units_type<dwarf_output>;
extern template class dwarf_output::copier<dwarf>;
extern template class dwarf_output::copier<dwarf_edit>;
class dwarf_path_finder
{
public:
- typedef typename dw::compile_units::const_iterator cu;
+ typedef typename dw::compile_units_type::const_iterator cu;
typedef typename dw::debug_info_entry::children_type::const_iterator die;
/* We maintain the current path down the logical DIE tree from the CU
template class dwarf_data::attr_value<dwarf_output, dwarf_output::value>;
template class dwarf_data::attributes_type<dwarf_output, dwarf_output::value>;
template class dwarf_data::compile_unit<dwarf_output>;
-template class dwarf_data::compile_units<dwarf_output>;
+template class dwarf_data::compile_units_type<dwarf_output>;
template class dwarf_output::copier<dwarf>;
template class dwarf_output::copier<dwarf_edit>;
};
template<class dw>
-static inline typename dw::compile_units::const_iterator
+static inline typename dw::compile_units_type::const_iterator
find_cu (const dw &file, const typename dw::debug_info_entry &entry)
{
dwarf::debug_info_entry::identity_type id = entry.compile_unit ().identity ();
- for (typename dw::compile_units::const_iterator cu
+ for (typename dw::compile_units_type::const_iterator cu
= file.compile_units ().begin ();
cu != file.compile_units ().end ();
++cu)
const dwarf_edit::debug_info_entry &b,
const dwarf_edit &dw)
{
- dwarf_edit::compile_units::const_iterator cu1, cu2;
+ dwarf_edit::compile_units_type::const_iterator cu1, cu2;
cu1 = dw.compile_units ().begin ();
cu2 = dw.compile_units ().begin ();
cu2++;
bool
compare_first_two_cus (const dwarf_edit &dw)
{
- dwarf_edit::compile_units::const_iterator cu1, cu2;
+ dwarf_edit::compile_units_type::const_iterator cu1, cu2;
cu1 = dw.compile_units ().begin ();
cu2 = dw.compile_units ().begin ();
cu2++;
test_last_two_dies (dwarf_edit &in, dwarf_output &out, int tag, bool same,
int n, const char *name)
{
- dwarf_edit::compile_units::const_iterator cu_in;
+ dwarf_edit::compile_units_type::const_iterator cu_in;
dwarf_edit::debug_info_entry::children_type::const_iterator it_in;
const dwarf_edit::debug_info_entry *die1 = NULL;
const dwarf_edit::debug_info_entry *die2 = NULL;
dwarf_tag_string (tag), n, name);
}
- dwarf_output::compile_units::const_iterator cu;
+ dwarf_output::compile_units_type::const_iterator cu;
dwarf_output::debug_info_entry::children_type::const_iterator it;
::Dwarf_Off off1 = 0;
::Dwarf_Off off2 = 0;
bool
test_first_two_cus (dwarf_output &out)
{
- dwarf_output::compile_units::const_iterator cu;
+ dwarf_output::compile_units_type::const_iterator cu;
cu = out.compile_units ().begin ();
ci children1 = (*cu).children ().begin ();
ci end1 = (*cu).children ().end();
static refs_map common_refs;
refs_map file_refs;
- for (typename file::compile_units::const_iterator i
+ for (typename file::compile_units_type::const_iterator i
= dw.compile_units ().begin (); i != dw.compile_units ().end (); ++i)
if (refs_shared_cu)
print_cu<file> (*i, limit, refs_shared_file ? common_refs : file_refs);