[Lldb-commits] [lldb] [llvm] [Obj2Yaml] Add support for minidump generation with 64b memory ranges. (PR #101272)

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Wed Aug 7 01:13:45 PDT 2024


================
@@ -494,6 +528,32 @@ Stream::create(const Directory &StreamDesc, const object::MinidumpFile &File) {
     }
     return std::make_unique<MemoryListStream>(std::move(Ranges));
   }
+  case StreamKind::Memory64List: {
+    // Error, unlike expected is true in failure state
+    Error Err = Error::success();
+    // Explicit check on Err so that if we return due to getmemory64list
+    // getting an error, it's not destructed when unchecked.
+    if (Err)
+      return Err;
+    auto ExpectedList = File.getMemory64List(Err);
+    if (!ExpectedList)
+      return ExpectedList.takeError();
----------------
labath wrote:

This is pretty clumsy, so yeah, I'm going to agree with myself that we should only use a single error object for returning getMemory64List errors.

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


More information about the lldb-commits mailing list