This is the mail archive of the elfutils-devel@sourceware.org mailing list for the elfutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

tests/dwarf_edit_output vs dwarf_path_finder changes


Hi,

The new dwarf_path_finder changes don't like the way
tests/dwarf_edit_output uses the dwarf_ref_tracker to compare two test
dies. It generates some assertion failures.

$ tests/dwarf_edit_output 
dwarf_edit_output: /home/mark/src/elfutils/libdw/c++/dwarf_tracker:306:
void elfutils::dwarf_path_finder<dw>::prime_path_to(const typename
dw::debug_info_entry&) [with dw = elfutils::dwarf_edit, typename
dw::debug_info_entry = elfutils::dwarf_edit::debug_info_entry]:
Assertion `_m_owner != __null' failed.
Aborted

This is most likely because it jumps to comparing the dies directly:

        // Customized compare function. Takes two debug_info_entries and
        // the dwarf structure they reside in. The first
        debug_info_entry is
        // assumed to reside in the first cu, the debug_info_entry in
        the
        // next cu.
        bool
        compare_dies (const dwarf_edit::debug_info_entry &a,
                      const dwarf_edit::debug_info_entry &b,
                      const dwarf_edit &dw)
        {
          dwarf_edit::compile_units_type::const_iterator cu1, cu2;
          cu1 = dw.compile_units ().begin ();
          cu2 = dw.compile_units ().begin ();
          cu2++;
        
          cmp_tracker::walk in (&this->_m_tracker, cu1, cu2);
        
          in.jump (a, b);
          return equals (a, b);
        }
        
in.jump (a, b) triggers the asserts.
What is the correct way to do this?

Thanks,

Mark


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]