[Lldb-commits] [lldb] b05c5e4 - [lldb][Windows] Don't kill lldb when a thread fails to stop (#200805)
via lldb-commits
lldb-commits at lists.llvm.org
Mon Jun 1 07:27:57 PDT 2026
Author: Charles Zablit
Date: 2026-06-01T15:27:51+01:00
New Revision: b05c5e4d8238bfe34f3b4df72377f714f2e60d2f
URL: https://github.com/llvm/llvm-project/commit/b05c5e4d8238bfe34f3b4df72377f714f2e60d2f
DIFF: https://github.com/llvm/llvm-project/commit/b05c5e4d8238bfe34f3b4df72377f714f2e60d2f.diff
LOG: [lldb][Windows] Don't kill lldb when a thread fails to stop (#200805)
Replace `exit(1)` in `NativeProcessWindows::StopThread` with logging so
a single thread suspend failure no longer terminates lldb itself.
Added:
Modified:
lldb/source/Plugins/Process/Windows/Common/NativeProcessWindows.cpp
Removed:
################################################################################
diff --git a/lldb/source/Plugins/Process/Windows/Common/NativeProcessWindows.cpp b/lldb/source/Plugins/Process/Windows/Common/NativeProcessWindows.cpp
index 56bad1a37b5d0..25170a388f824 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);
}
More information about the lldb-commits
mailing list