llvmorg-github-actions[bot] wrote:

<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-lldb

Author: Charles Zablit (charles-zablit)

<details>
<summary>Changes</summary>

Replace `exit(1)` in `NativeProcessWindows::StopThread` with logging so a 
single thread suspend failure no longer terminates lldb itself.

---
Full diff: https://github.com/llvm/llvm-project/pull/200805.diff


1 Files Affected:

- (modified) 
lldb/source/Plugins/Process/Windows/Common/NativeProcessWindows.cpp (+3-3) 


``````````diff
diff --git 
a/lldb/source/Plugins/Process/Windows/Common/NativeProcessWindows.cpp 
b/lldb/source/Plugins/Process/Windows/Common/NativeProcessWindows.cpp
index 26fc31fb27cf6..2c00529c59d55 100644
--- a/lldb/source/Plugins/Process/Windows/Common/NativeProcessWindows.cpp
+++ b/lldb/source/Plugins/Process/Windows/Common/NativeProcessWindows.cpp
@@ -277,11 +277,11 @@ void NativeProcessWindows::StopThread(lldb::tid_t 
thread_id,
   if (!thread)
     return;
 
+  Log *log = GetLog(WindowsLog::Thread);
   for (uint32_t i = 0; i < m_threads.size(); ++i) {
     auto t = static_cast<NativeThreadWindows *>(m_threads[i].get());
-    Status error = t->DoStop();
-    if (error.Fail())
-      exit(1);
+    if (Status error = t->DoStop(); error.Fail())
+      LLDB_LOG(log, "failed to stop thread {0}: {1}", t->GetID(), error);
   }
   SetStopReasonForThread(*thread, reason, description);
 }

``````````

</details>


https://github.com/llvm/llvm-project/pull/200805
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to