]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
Fix some iterator equality predicates.
authorRoland McGrath <roland@redhat.com>
Tue, 27 Jan 2009 12:07:03 +0000 (04:07 -0800)
committerRoland McGrath <roland@redhat.com>
Tue, 27 Jan 2009 12:07:03 +0000 (04:07 -0800)
libdw/c++/dwarf

index 9dd2a425f80a5e47b74d6324e2235b5a372f2be1..1e231e0c90fa563305b88936215d2ed769d44676 100644 (file)
 
   ------ XXX to be done: more file-level containers
 
-  input side only (?):
-
-  aranges_by_unit : map<CU, range_list>
-       can compare range_list == cu.ranges ()
-       only used for dwarflint, can be slow/copying
+  input side only:
 
   units_by_addr : map<pair<begin,end>, CU> and map<address, CU>
        use dwarf_getarange_addr
 
-  pub{names,types}_by_unit
+  pub{names,types} : map<string, debug_info_entry> (across all CUs)
 
   output too:
 
-  pub{names,types}_by_name
+  pubnames_map : map<string, debug_info_entry>
+  pub{names,types}_units : map<compile_unit, pubnames_map>
        too much lang knowledge to autogenerate for now,
        output will do it explicitly
+
  */
 
 // DWARF reader interfaces: front end to <libdw.h> 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
        {