[Lldb-commits] [lldb] r181386 - If the MemoryCache is asked to look up an address that is in an invalid

Jim Ingham jingham at apple.com
Tue May 7 18:20:53 PDT 2013


Author: jingham
Date: Tue May  7 20:20:53 2013
New Revision: 181386

URL: http://llvm.org/viewvc/llvm-project?rev=181386&view=rev
Log:
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.

Modified:
    lldb/trunk/source/Target/Memory.cpp

Modified: lldb/trunk/source/Target/Memory.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Memory.cpp?rev=181386&r1=181385&r2=181386&view=diff
==============================================================================
--- lldb/trunk/source/Target/Memory.cpp (original)
+++ lldb/trunk/source/Target/Memory.cpp Tue May  7 20:20:53 2013
@@ -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 ();





More information about the lldb-commits mailing list