From: Roland McGrath Date: Fri, 25 Sep 2009 21:57:15 +0000 (-0700) Subject: Compare a single location so it matches a one-element full-range location list. X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d1968cea69459801eadeb2de63c85820c22335fd;p=thirdparty%2Felfutils.git Compare a single location so it matches a one-element full-range location list. --- diff --git a/libdw/ChangeLog b/libdw/ChangeLog index c6a576c7a..7c5e03997 100644 --- a/libdw/ChangeLog +++ b/libdw/ChangeLog @@ -1,5 +1,8 @@ 2009-09-25 Roland McGrath + * c++/dwarf (dwarf::location_attr::operator==): Compare a singleton as + a list so it matches a one-element full-range list. + * c++/values.cc (dwarf::range_list::const_iterator::const_iterator): For begin case, actually get the offset from the attribute! (dwarf::location_attr::begin): Likewise. diff --git a/libdw/c++/dwarf b/libdw/c++/dwarf index 05c4af4e1..3f7210e03 100644 --- a/libdw/c++/dwarf +++ b/libdw/c++/dwarf @@ -1574,11 +1574,11 @@ namespace elfutils || std::find_if (other.begin (), other.end (), nonempty () ) == other.end ()); - if (!is_list ()) - return (!other.is_list () && !other.empty () - && location () == other.location ()); - return other.is_list () && subr::container_equal (*this, other); + if (!is_list () && !other.is_list ()) + return !other.empty () && location () == other.location (); + + return subr::container_equal (*this, other); } template inline bool operator!= (const other_file &other) const