aboutsummaryrefslogtreecommitdiff
path: root/gdb/memrange.h
diff options
context:
space:
mode:
authorAndrew Burgess <aburgess@redhat.com>2024-04-30 15:48:21 +0100
committerAndrew Burgess <aburgess@redhat.com>2024-05-09 10:10:50 +0100
commitcba95c27876724059c3e99ea1857fb19b9cf8220 (patch)
treea8cf28cd5e5347b3c2179c2bd6a2295409e05bfb /gdb/memrange.h
parentcb1a6b85b84359419e7fcf9069c3ba9d27a856c7 (diff)
downloadgdb-cba95c27876724059c3e99ea1857fb19b9cf8220.zip
gdb-cba95c27876724059c3e99ea1857fb19b9cf8220.tar.gz
gdb-cba95c27876724059c3e99ea1857fb19b9cf8220.tar.bz2
gdb: convert address_in_mem_range to mem_range::contains
Replace the global function address_in_mem_range with the member function mem_range::contains. The implementation of the function doesn't change. There should be no user visible changes after this commit. Approved-By: Tom Tromey <tom@tromey.com>
Diffstat (limited to 'gdb/memrange.h')
-rw-r--r--gdb/memrange.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/gdb/memrange.h b/gdb/memrange.h
index 74df825..d83fcbd 100644
--- a/gdb/memrange.h
+++ b/gdb/memrange.h
@@ -41,6 +41,9 @@ struct mem_range
&& this->length == other.length);
}
+ /* Returns true if ADDR is in this mem_range. */
+ bool contains (CORE_ADDR addr) const;
+
/* Lowest address in the range. */
CORE_ADDR start;
@@ -54,11 +57,6 @@ struct mem_range
extern int mem_ranges_overlap (CORE_ADDR start1, int len1,
CORE_ADDR start2, int len2);
-/* Returns true if ADDR is in RANGE. */
-
-extern int address_in_mem_range (CORE_ADDR addr,
- const struct mem_range *range);
-
/* Sort ranges by start address, then coalesce contiguous or
overlapping ranges. */