summaryrefslogtreecommitdiffstats
path: root/lldb/source/Target/Memory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Target/Memory.cpp')
-rw-r--r--lldb/source/Target/Memory.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/lldb/source/Target/Memory.cpp b/lldb/source/Target/Memory.cpp
index c89fd510114..3c81a8fc78d 100644
--- a/lldb/source/Target/Memory.cpp
+++ b/lldb/source/Target/Memory.cpp
@@ -78,7 +78,11 @@ MemoryCache::Flush (addr_t addr, size_t size)
if (!m_L1_cache.empty())
{
AddrRange flush_range(addr, size);
- BlockMap::iterator pos = m_L1_cache.lower_bound(addr);
+ BlockMap::iterator pos = m_L1_cache.upper_bound(addr);
+ if (pos != m_L1_cache.begin())
+ {
+ --pos;
+ }
while (pos != m_L1_cache.end())
{
AddrRange chunk_range(pos->first, pos->second->GetByteSize());
OpenPOWER on IntegriCloud