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

via lldb-commits lldb-commits at lists.llvm.org
Fri Sep 6 15:33:07 PDT 2024


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff c014db47ca298ad7a0f52a57c3bfc2a9914371b2 bfb8f4f2f9becfd3156aefbcf1d34673abbcd8bd --extensions h,cpp -- lldb/source/Plugins/Process/minidump/MinidumpParser.cpp lldb/source/Plugins/Process/minidump/MinidumpParser.h lldb/source/Plugins/Process/minidump/ProcessMinidump.cpp lldb/source/Plugins/Process/minidump/ProcessMinidump.h lldb/unittests/Process/minidump/MinidumpParserTest.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/lldb/source/Plugins/Process/minidump/MinidumpParser.h b/lldb/source/Plugins/Process/minidump/MinidumpParser.h
index 20f6d2a189..f0b6e6027c 100644
--- a/lldb/source/Plugins/Process/minidump/MinidumpParser.h
+++ b/lldb/source/Plugins/Process/minidump/MinidumpParser.h
@@ -48,7 +48,8 @@ struct Range {
 };
 
 using FallibleMemory64Iterator = llvm::object::MinidumpFile::FallibleMemory64Iterator;
-using ExceptionStreamsIterator = llvm::object::MinidumpFile::ExceptionStreamsIterator;
+using ExceptionStreamsIterator =
+    llvm::object::MinidumpFile::ExceptionStreamsIterator;
 
 class MinidumpParser {
 public:
@@ -85,8 +86,7 @@ public:
   // have the same name, it keeps the copy with the lowest load address.
   std::vector<const minidump::Module *> GetFilteredModuleList();
 
-  llvm::iterator_range<ExceptionStreamsIterator>
-  GetExceptionStreams();
+  llvm::iterator_range<ExceptionStreamsIterator> GetExceptionStreams();
 
   std::optional<Range> FindMemoryRange(lldb::addr_t addr);
 
diff --git a/lldb/source/Plugins/Process/minidump/ProcessMinidump.cpp b/lldb/source/Plugins/Process/minidump/ProcessMinidump.cpp
index 67f3cfda9c..218012e656 100644
--- a/lldb/source/Plugins/Process/minidump/ProcessMinidump.cpp
+++ b/lldb/source/Plugins/Process/minidump/ProcessMinidump.cpp
@@ -216,8 +216,8 @@ Status ProcessMinidump::DoLoadCore() {
       continue;
 
     if (!m_exceptions_by_tid
-              .try_emplace(exception_stream->ThreadId, exception_stream.get())
-              .second) {
+             .try_emplace(exception_stream->ThreadId, exception_stream.get())
+             .second) {
       // We only cast to avoid the warning around converting little endian in
       // printf.
       return Status::FromErrorStringWithFormat(
diff --git a/lldb/unittests/Process/minidump/MinidumpParserTest.cpp b/lldb/unittests/Process/minidump/MinidumpParserTest.cpp
index 4e13a48cf1..c7547ba261 100644
--- a/lldb/unittests/Process/minidump/MinidumpParserTest.cpp
+++ b/lldb/unittests/Process/minidump/MinidumpParserTest.cpp
@@ -258,7 +258,7 @@ TEST_F(MinidumpParserTest, GetExceptionStream) {
     ASSERT_EQ(16001UL, exception_stream->ThreadId);
     count++;
   }
-  
+
   ASSERT_THAT(1UL, count);
 }
 

``````````

</details>


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


More information about the lldb-commits mailing list