/* The memory range data structure, and associated utilities.
- Copyright (C) 2010-2017 Free Software Foundation, Inc.
+ Copyright (C) 2010-2019 Free Software Foundation, Inc.
This file is part of GDB.
: start (start_), length (length_)
{}
+ bool operator< (const mem_range &other) const
+ {
+ return this->start < other.start;
+ }
+
+ bool operator== (const mem_range &other) const
+ {
+ return (this->start == other.start
+ && this->length == other.length);
+ }
+
/* Lowest address in the range. */
CORE_ADDR start;
int length;
};
-typedef struct mem_range mem_range_s;
-
-DEF_VEC_O(mem_range_s);
-
/* Returns true if the ranges defined by [start1, start1+len1) and
[start2, start2+len2) overlap. */
/* Sort ranges by start address, then coalesce contiguous or
overlapping ranges. */
-extern void normalize_mem_ranges (VEC(mem_range_s) *memory);
+extern void normalize_mem_ranges (std::vector<mem_range> *memory);
#endif