X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/e7c91bff0bd806356165411e2d81c047ab243028..546888e0918a3cda4cd2ffb5786f67dda3883a81:/src/mc/LocationList.hpp diff --git a/src/mc/LocationList.hpp b/src/mc/LocationList.hpp index 289a2c18f8..52efb5bc5d 100644 --- a/src/mc/LocationList.hpp +++ b/src/mc/LocationList.hpp @@ -15,31 +15,30 @@ #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 */ +/** \brief 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}; + 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 +49,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); } };