aboutsummaryrefslogtreecommitdiff
path: root/gdb/memrange.h
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/memrange.h')
-rw-r--r--gdb/memrange.h17
1 files changed, 12 insertions, 5 deletions
diff --git a/gdb/memrange.h b/gdb/memrange.h
index 029ec71..fb10cda 100644
--- a/gdb/memrange.h
+++ b/gdb/memrange.h
@@ -32,6 +32,17 @@ struct mem_range
: 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;
@@ -39,10 +50,6 @@ struct mem_range
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. */
@@ -57,6 +64,6 @@ extern int address_in_mem_range (CORE_ADDR addr,
/* 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