X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/e7c91bff0bd806356165411e2d81c047ab243028..9575359fcebd3a393b65891c293990d1a882eb34:/src/mc/LocationList.hpp diff --git a/src/mc/LocationList.hpp b/src/mc/LocationList.hpp index 289a2c18f8..830f02437e 100644 --- a/src/mc/LocationList.hpp +++ b/src/mc/LocationList.hpp @@ -15,31 +15,31 @@ #include #include +#include #include -#include "simgrid_config.h" #include "src/mc/mc_base.h" #include "src/mc/mc_forward.hpp" -#include "src/mc/AddressSpace.hpp" #include "src/mc/DwarfExpression.hpp" namespace simgrid { namespace dwarf { -/** \brief A DWARF expression with optional validity contraints */ +/** A DWARF expression with optional validity constraints */ class LocationListEntry { public: - typedef simgrid::xbt::range range_type; + typedef simgrid::xbt::Range range_type; private: DwarfExpression expression_; - range_type range_ = {0, 0}; + // By default, the expression is always valid: + 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); } };