diff options
author | Jim Ingham <jingham@apple.com> | 2013-05-08 01:20:53 +0000 |
---|---|---|
committer | Jim Ingham <jingham@apple.com> | 2013-05-08 01:20:53 +0000 |
commit | 55d24311f25afe46bd316dec557d27d5c24c6f6d (patch) | |
tree | 0e486abc334e191d6536826cf6cf2480cab105d4 /lldb/source/Target/Memory.cpp | |
parent | cba4a0c593635cdf33c2eedaf659afead9c6079b (diff) | |
download | bcm5719-llvm-55d24311f25afe46bd316dec557d27d5c24c6f6d.tar.gz bcm5719-llvm-55d24311f25afe46bd316dec557d27d5c24c6f6d.zip |
If the MemoryCache is asked to look up an address that is in an invalid
range, it should set the error in the Error passed into the function.
llvm-svn: 181386
Diffstat (limited to 'lldb/source/Target/Memory.cpp')
-rw-r--r-- | lldb/source/Target/Memory.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lldb/source/Target/Memory.cpp b/lldb/source/Target/Memory.cpp index ecefd2ef0e0..ee475f2a484 100644 --- a/lldb/source/Target/Memory.cpp +++ b/lldb/source/Target/Memory.cpp @@ -128,7 +128,10 @@ MemoryCache::Read (addr_t addr, while (bytes_left > 0) { if (m_invalid_ranges.FindEntryThatContains(curr_addr)) + { + error.SetErrorStringWithFormat("memory read failed for 0x%" PRIx64, curr_addr); return dst_len - bytes_left; + } BlockMap::const_iterator pos = m_cache.find (curr_addr); BlockMap::const_iterator end = m_cache.end (); |