[Lldb-commits] [lldb] [lldb][Windows] Don't kill lldb when a thread fails to stop (PR #200805)
via lldb-commits
lldb-commits at lists.llvm.org
Mon Jun 1 06:04:17 PDT 2026
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
More information about the lldb-commits
mailing list