]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
dwarf_comparator fix for individual-item comparison of references.
authorRoland McGrath <roland@redhat.com>
Fri, 2 Oct 2009 20:34:41 +0000 (13:34 -0700)
committerRoland McGrath <roland@redhat.com>
Fri, 2 Oct 2009 20:34:41 +0000 (13:34 -0700)
libdw/ChangeLog
libdw/c++/dwarf_comparator

index df72bf96dec897d6103fc173f920eff9d1a689d0..019427d35557ba62dd71b530b03aa2130238bf2b 100644 (file)
@@ -1,3 +1,8 @@
+2009-10-02  Roland McGrath  <roland@redhat.com>
+
+       * c++/dwarf_comparator: Fix overload magic to distinguish reference
+       comparisons from child comparisons.
+
 2009-10-01  Roland McGrath  <roland@redhat.com>
 
        * c++/dwarf_tracker (dwarf_path_finder::walk_down_to): Fix sibling
index 88f656f504a4478ebc241bff5b8ee39038a10d69..b9bf317f02819f5a7e87526d8118c9c78a55aa07 100644 (file)
@@ -208,7 +208,7 @@ namespace elfutils
 
       inline bool operator () (const item1 &a, const item2 &b)
       {
-       return _m_cmp.equals (a, b);
+       return _m_cmp.match_deref (a, b);
       }
     };
 #define MATCHER(item) \
@@ -242,7 +242,7 @@ namespace elfutils
 
     typedef typename dwarf1::debug_info_entry die1;
     typedef typename dwarf2::debug_info_entry die2;
-    inline bool match (const cu1_it &a, const cu2_it &b)
+    inline bool match_deref (const cu1_it &a, const cu2_it &b)
     {
       typename tracker::walk in (&_m_tracker, a, b);
       return equals (*a, *b);
@@ -376,7 +376,7 @@ namespace elfutils
       return equals (*a, *b);
     }
 
-    inline bool match (const cit1 &a, const cit2 &b)
+    inline bool match_deref (const cit1 &a, const cit2 &b)
     {
       // Maybe the tracker has already cached a correspondence of DIEs.
       typename tracker::reference_match matched;
@@ -551,6 +551,12 @@ namespace elfutils
       return _m_tracker.notice_match (matched, ref1, ref2, result);
     }
 
+    // This is what the public equals method uses for references.
+    inline bool match (const cit1 &a, const cit2 &b)
+    {
+      return reference_match (a, b);
+    }
+
   public:
     inline explicit dwarf_comparator (tracker &t)
       : _m_tracker (t)