================
@@ -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);
+      LLDB_LOGF(log, "Failed to read memory region. Bytes read: %zu, error: 
%s",
+                bytes_read, error.AsCString());
+      error.Clear();
+    }
+
+    if (bytes_read == 0) {
----------------
jeffreytan81 wrote:

If you undo the `{}` around single line block this should be good to go.

https://github.com/llvm/llvm-project/pull/88564
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to