From: Roland McGrath Date: Tue, 27 Jan 2009 12:07:03 +0000 (-0800) Subject: Fix some iterator equality predicates. X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b05c53df7e0b45f711345277f7253453a5bf61e8;p=thirdparty%2Felfutils.git Fix some iterator equality predicates. --- diff --git a/libdw/c++/dwarf b/libdw/c++/dwarf index 9dd2a425f..1e231e0c9 100644 --- a/libdw/c++/dwarf +++ b/libdw/c++/dwarf @@ -138,22 +138,20 @@ ------ XXX to be done: more file-level containers - input side only (?): - - aranges_by_unit : map - can compare range_list == cu.ranges () - only used for dwarflint, can be slow/copying + input side only: units_by_addr : map, CU> and map use dwarf_getarange_addr - pub{names,types}_by_unit + pub{names,types} : map (across all CUs) output too: - pub{names,types}_by_name + pubnames_map : map + pub{names,types}_units : map too much lang knowledge to autogenerate for now, output will do it explicitly + */ // DWARF reader interfaces: front end to routines @@ -1165,7 +1163,7 @@ namespace elfutils inline bool operator== (const const_iterator &other) const { - return _m_offset == other._m_offset; + return _m_offset == other._m_offset && _m_cu == other._m_cu; } inline bool operator!= (const const_iterator &other) const { @@ -1362,7 +1360,8 @@ namespace elfutils inline bool operator== (const const_iterator &other) const { - return _m_offset == other._m_offset; + return (_m_die._m_die.addr == other._m_die._m_die.addr + && _m_offset == other._m_offset); } inline bool operator!= (const const_iterator &other) const { @@ -1497,7 +1496,8 @@ namespace elfutils inline bool operator== (const const_iterator &other) const { - return _m_next == other._m_next; + return (_m_die._m_die.addr == other._m_die._m_die.addr + && _m_next == other._m_next); } inline bool operator!= (const const_iterator &other) const {