From b05c53df7e0b45f711345277f7253453a5bf61e8 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 27 Jan 2009 04:07:03 -0800 Subject: [PATCH] Fix some iterator equality predicates. --- libdw/c++/dwarf | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) 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 { -- 2.47.3