diff options
Diffstat (limited to 'gdb/memrange.c')
-rw-r--r-- | gdb/memrange.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gdb/memrange.c b/gdb/memrange.c index 2895ff2df1f..485550b29b0 100644 --- a/gdb/memrange.c +++ b/gdb/memrange.c @@ -31,6 +31,15 @@ mem_ranges_overlap (CORE_ADDR start1, int len1, return (l < h); } +/* See memrange.h. */ + +int +address_in_mem_range (CORE_ADDR address, const struct mem_range *r) +{ + return (r->start <= address + && (address - r->start) < r->length); +} + /* qsort comparison function, that compares mem_ranges. Ranges are sorted in ascending START order. */ |