[Lldb-commits] [lldb] [LLDB][Minidump] Add breakpoint stop reasons to the minidump. (PR #108448)

via lldb-commits lldb-commits at lists.llvm.org
Thu Sep 12 13:35:52 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 030c6da7af826b641db005be925b20f956c3a6bb 030b74c9e763c86d217da39487478e7cf2dff074 --extensions h,cpp -- lldb/source/Plugins/ObjectFile/Minidump/MinidumpFileBuilder.cpp lldb/source/Plugins/ObjectFile/Minidump/MinidumpFileBuilder.h
``````````

</details>

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

``````````diff
diff --git a/lldb/source/Plugins/ObjectFile/Minidump/MinidumpFileBuilder.cpp b/lldb/source/Plugins/ObjectFile/Minidump/MinidumpFileBuilder.cpp
index 0b69f1b820..492df463a3 100644
--- a/lldb/source/Plugins/ObjectFile/Minidump/MinidumpFileBuilder.cpp
+++ b/lldb/source/Plugins/ObjectFile/Minidump/MinidumpFileBuilder.cpp
@@ -55,11 +55,12 @@ using namespace lldb_private;
 using namespace llvm::minidump;
 
 // Set of all the stop reasons minidumps will collect.
-const std::unordered_set<lldb::StopReason> MinidumpFileBuilder::thread_stop_reasons {
-  lldb::StopReason::eStopReasonException,
-  lldb::StopReason::eStopReasonSignal,
-  lldb::StopReason::eStopReasonBreakpoint,
-};
+const std::unordered_set<lldb::StopReason>
+    MinidumpFileBuilder::thread_stop_reasons{
+        lldb::StopReason::eStopReasonException,
+        lldb::StopReason::eStopReasonSignal,
+        lldb::StopReason::eStopReasonBreakpoint,
+    };
 
 Status MinidumpFileBuilder::AddHeaderAndCalculateDirectories() {
   // First set the offset on the file, and on the bytes saved
@@ -692,8 +693,9 @@ Status MinidumpFileBuilder::AddExceptions() {
   for (const ThreadSP &thread_sp : thread_list) {
     StopInfoSP stop_info_sp = thread_sp->GetStopInfo();
     bool add_exception = false;
-    if (stop_info_sp && thread_stop_reasons.count(stop_info_sp->GetStopReason()) > 0) {
-        add_exception = true;
+    if (stop_info_sp &&
+        thread_stop_reasons.count(stop_info_sp->GetStopReason()) > 0) {
+      add_exception = true;
     }
 
     if (add_exception) {
diff --git a/lldb/source/Plugins/ObjectFile/Minidump/MinidumpFileBuilder.h b/lldb/source/Plugins/ObjectFile/Minidump/MinidumpFileBuilder.h
index 488eec7b92..9290290b64 100644
--- a/lldb/source/Plugins/ObjectFile/Minidump/MinidumpFileBuilder.h
+++ b/lldb/source/Plugins/ObjectFile/Minidump/MinidumpFileBuilder.h
@@ -168,7 +168,7 @@ private:
       m_tid_to_reg_ctx;
   std::unordered_set<lldb::addr_t> m_saved_stack_ranges;
   lldb::FileUP m_core_file;
-  lldb_private::SaveCoreOptions m_save_core_options; 
+  lldb_private::SaveCoreOptions m_save_core_options;
   static const std::unordered_set<lldb::StopReason> thread_stop_reasons;
 };
 #endif // LLDB_SOURCE_PLUGINS_OBJECTFILE_MINIDUMP_MINIDUMPFILEBUILDER_H

``````````

</details>


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


More information about the lldb-commits mailing list