[lldb] [llvm] [LLDB][Minidump] Support minidumps where there are multiple exception streams (PR #97470)

via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 5 11:37:15 PDT 2024


================
@@ -53,6 +54,31 @@ Expected<std::string> MinidumpFile::getString(size_t Offset) const {
   return Result;
 }
 
+Expected<std::vector<minidump::ExceptionStream>>
+MinidumpFile::getExceptionStreams() const {
+  // Scan the directories for exceptions first
+  std::vector<Directory> exceptionStreams;
+  for (const auto &directory : Streams) {
+    if (directory.Type == StreamType::Exception)
+      exceptionStreams.push_back(directory);
+  }
----------------
jeffreytan81 wrote:

Similar, I do not think you need to make a copy of `Directory`, returning by reference is enough.

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


More information about the llvm-commits mailing list