diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2016-02-13 15:01:33 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2016-02-13 15:01:33 +0000 |
commit | 2fc5d2d1dfaf623ce4e24cd8590565902f8c557c (patch) | |
tree | 525149683974afa86747b749d45f0425749e972e /include/lldb/Core/RangeMap.h | |
parent | e195173fdf080138dbb42936dea88c605e4b9a56 (diff) |
Notes
Diffstat (limited to 'include/lldb/Core/RangeMap.h')
-rw-r--r-- | include/lldb/Core/RangeMap.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/include/lldb/Core/RangeMap.h b/include/lldb/Core/RangeMap.h index b2e3f06f08a9..28d3083979d6 100644 --- a/include/lldb/Core/RangeMap.h +++ b/include/lldb/Core/RangeMap.h @@ -1216,6 +1216,25 @@ namespace lldb_private { } return UINT32_MAX; } + + uint32_t + FindEntryIndexesThatContain(B addr, std::vector<uint32_t> &indexes) const + { +#ifdef ASSERT_RANGEMAP_ARE_SORTED + assert (IsSorted()); +#endif + + if (!m_entries.empty()) + { + typename Collection::const_iterator pos; + for (const auto &entry : m_entries) + { + if (entry.Contains(addr)) + indexes.push_back(entry.data); + } + } + return indexes.size() ; + } Entry * FindEntryThatContains (B addr) |