inline const debug_info_entry &operator* () const
{
+ if (unlikely (_m_die._m_die.addr == NULL))
+ throw std::runtime_error ("dereferencing end iterator");
return _m_die;
}
inline const debug_info_entry *operator-> () const
inline attribute operator* () const
{
+ if (unlikely (_m_offset == 1))
+ throw std::runtime_error ("dereferencing end iterator");
return attribute (_m_attr);
}
};
inline value_type operator* () const
{
+ if (unlikely (_m_offset == 1))
+ throw std::runtime_error ("dereferencing end iterator");
return std::make_pair (_m_base + _m_begin, _m_base + _m_end);
}
}
};
+ // This describes one entry in the line information table.
class line_entry
{
private:
bool operator== (const line_entry &other) const;
};
+ /* This describes a CU's line information table.
+ It works like a read-only std::vector<line_entry>,
+ and also supports lookup by address.
+ XXX later, by file/line
+ */
class line_table
{
private:
return *this;
}
- const directory_table include_directories () const
+ inline const directory_table include_directories () const
{
return directory_table (_m_files);
}
- const file_table files () const
+ inline const file_table files () const
{
return file_table (_m_files);
}
inline value_type operator* () const
{
+ if (unlikely (_m_offset == 1))
+ throw std::runtime_error ("dereferencing end iterator");
return std::make_pair (_m_begin, _m_end);
}
inline const debug_info_entry &operator* () const
{
+ if (unlikely (_m_next == (::Dwarf_Off) -1))
+ throw std::runtime_error ("dereferencing end iterator");
return _m_die;
}
inline const debug_info_entry *operator-> () const