diff options
author | Marianne Mailhot-Sarrasin <marianne.mailhot.sarrasin@gmail.com> | 2016-03-11 13:50:10 +0000 |
---|---|---|
committer | Marianne Mailhot-Sarrasin <marianne.mailhot.sarrasin@gmail.com> | 2016-03-11 13:50:10 +0000 |
commit | 7a4eed280a6d0b11895662d3509aff08009492c3 (patch) | |
tree | a57e8b0a064200db1e3707358c7977019ded6977 /lldb/source/Target/Memory.cpp | |
parent | aef32bd319733bd233cc370e7eaf7807b5f0cade (diff) | |
download | bcm5719-llvm-7a4eed280a6d0b11895662d3509aff08009492c3.tar.gz bcm5719-llvm-7a4eed280a6d0b11895662d3509aff08009492c3.zip |
Fixed MemoryCache L1 cache flush
Use the same method to find the cache line as in Read().
Differential Revision: http://reviews.llvm.org/D18050
llvm-svn: 263233
Diffstat (limited to 'lldb/source/Target/Memory.cpp')
-rw-r--r-- | lldb/source/Target/Memory.cpp | 6 |
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()); |