From d780545ccaaae487edef9b6d293f3c61ab511fe4 Mon Sep 17 00:00:00 2001 From: Gabriel Corona Date: Tue, 23 Feb 2016 16:46:35 +0100 Subject: [PATCH] [mc] Remove a ugly special case in LocationListEntry --- src/mc/LocationList.cpp | 2 +- src/mc/LocationList.hpp | 10 +++------- 2 files changed, 4 insertions(+), 8 deletions(-) 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); } }; -- 2.20.1