[Lldb-commits] [lldb] [lldb][MinidumpFileBuilder] Fix addition of MemoryList steam (PR #88564)

via lldb-commits lldb-commits at lists.llvm.org
Wed Apr 17 11:23:17 PDT 2024


================
@@ -649,16 +651,25 @@ MinidumpFileBuilder::AddMemoryList(const lldb::ProcessSP &process_sp,
   DataBufferHeap helper_data;
   std::vector<MemoryDescriptor> mem_descriptors;
   for (const auto &core_range : core_ranges) {
-    // Skip empty memory regions or any regions with no permissions.
-    if (core_range.range.empty() || core_range.lldb_permissions == 0)
+    // Skip empty memory regions.
+    if (core_range.range.empty())
       continue;
     const addr_t addr = core_range.range.start();
     const addr_t size = core_range.range.size();
     auto data_up = std::make_unique<DataBufferHeap>(size, 0);
     const size_t bytes_read =
         process_sp->ReadMemory(addr, data_up->GetBytes(), size, error);
-    if (bytes_read == 0)
+    if (error.Fail()) {
+      Log *log = GetLog(LLDBLog::SystemRuntime);
----------------
jeffreytan81 wrote:

I still think we should emit this to end users as public messages instead of as an internal log. I am ok to do this in future follow ups.

https://github.com/llvm/llvm-project/pull/88564


More information about the lldb-commits mailing list