[Lldb-commits] [lldb] [lldb][Windows] Don't kill lldb when a thread fails to stop (PR #200805)
Charles Zablit via lldb-commits
lldb-commits at lists.llvm.org
Mon Jun 1 06:03:34 PDT 2026
https://github.com/charles-zablit created https://github.com/llvm/llvm-project/pull/200805
Replace `exit(1)` in `NativeProcessWindows::StopThread` with logging so a single thread suspend failure no longer terminates lldb itself.
>From 8944b62eebef73319b878ae389c0c83ad7fe97cd Mon Sep 17 00:00:00 2001
From: Charles Zablit <c_zablit at apple.com>
Date: Mon, 1 Jun 2026 14:02:17 +0100
Subject: [PATCH] [lldb][Windows] Don't kill lldb when a thread fails to stop
---
.../Plugins/Process/Windows/Common/NativeProcessWindows.cpp | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
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);
}
More information about the lldb-commits
mailing list