From: Gabriel Corona Date: Tue, 23 Feb 2016 15:46:35 +0000 (+0100) Subject: [mc] Remove a ugly special case in LocationListEntry X-Git-Tag: v3_13~723 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/d780545ccaaae487edef9b6d293f3c61ab511fe4 [mc] Remove a ugly special case in LocationListEntry --- diff --git a/src/mc/LocationList.cpp b/src/mc/LocationList.cpp index 7ce1b1e424..aabcab59b0 100644 --- a/src/mc/LocationList.cpp +++ b/src/mc/LocationList.cpp @@ -96,7 +96,7 @@ LocationList location_list( LocationListEntry::range_type range; if (start == 0) // If start == 0, this is not a location list: - range = {0, 0}; + range = { 0, UINT64_MAX }; else range = { base_address + start, base_address + end }; diff --git a/src/mc/LocationList.hpp b/src/mc/LocationList.hpp index 289a2c18f8..57326a0269 100644 --- a/src/mc/LocationList.hpp +++ b/src/mc/LocationList.hpp @@ -32,14 +32,14 @@ public: typedef simgrid::xbt::range range_type; private: DwarfExpression expression_; - range_type range_ = {0, 0}; + range_type range_ = {0, UINT64_MAX}; public: LocationListEntry() {} LocationListEntry(DwarfExpression expression, range_type range) : expression_(std::move(expression)), range_(range) {} LocationListEntry(DwarfExpression expression) - : expression_(std::move(expression)), range_({0, 0}) + : expression_(std::move(expression)), range_({0, UINT64_MAX}) {} DwarfExpression& expression() @@ -50,13 +50,9 @@ public: { return expression_; } - bool always_valid() const - { - return range_.begin() == 0 && range_.end() == 0; - } bool valid_for_ip(unw_word_t ip) const { - return always_valid() || range_.contain(ip); + return range_.contain(ip); } };