summaryrefslogtreecommitdiffstats
path: root/lldb/source/Target/Memory.cpp
diff options
context:
space:
mode:
authorJim Ingham <jingham@apple.com>2013-05-08 01:20:53 +0000
committerJim Ingham <jingham@apple.com>2013-05-08 01:20:53 +0000
commit55d24311f25afe46bd316dec557d27d5c24c6f6d (patch)
tree0e486abc334e191d6536826cf6cf2480cab105d4 /lldb/source/Target/Memory.cpp
parentcba4a0c593635cdf33c2eedaf659afead9c6079b (diff)
downloadbcm5719-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.cpp3
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 ();
OpenPOWER on IntegriCloud