[Lldb-commits] [PATCH] D10899: Fix qMemoryRegionInfo packet to return current value for address after the last memory region

Tamas Berghammer tberghammer at google.com
Fri Jul 3 02:30:35 PDT 2015


This revision was automatically updated to reflect the committed changes.
Closed by commit rL241333: Fix qMemoryRegionInfo packet to return current value for address after theā€¦ (authored by tberghammer).

Changed prior to commit:
  http://reviews.llvm.org/D10899?vs=28948&id=29000#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D10899

Files:
  lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp

Index: lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp
===================================================================
--- lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp
+++ lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp
@@ -2702,12 +2702,25 @@
         // The target memory address comes somewhere after the region we just parsed.
     }
 
-    // If we made it here, we didn't find an entry that contained the given address.
-    error.SetErrorString ("address comes after final region");
-
-    if (log)
-        log->Printf ("NativeProcessLinux::%s failed to find map entry for address 0x%" PRIx64 ": %s", __FUNCTION__, load_addr, error.AsCString ());
-
+    // If we made it here, we didn't find an entry that contained the given address. Return the
+    // load_addr as start and the amount of bytes betwwen load address and the end of the memory as
+    // size.
+    range_info.GetRange ().SetRangeBase (load_addr);
+    switch (m_arch.GetAddressByteSize())
+    {
+        case 4:
+            range_info.GetRange ().SetByteSize (0x100000000ull - load_addr);
+            break;
+        case 8:
+            range_info.GetRange ().SetByteSize (0ull - load_addr);
+            break;
+        default:
+            assert(false && "Unrecognized data byte size");
+            break;
+    }
+    range_info.SetReadable (MemoryRegionInfo::OptionalBool::eNo);
+    range_info.SetWritable (MemoryRegionInfo::OptionalBool::eNo);
+    range_info.SetExecutable (MemoryRegionInfo::OptionalBool::eNo);
     return error;
 }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D10899.29000.patch
Type: text/x-patch
Size: 1577 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150703/8228fbf2/attachment.bin>


More information about the lldb-commits mailing list