[Lldb-commits] [lldb] [lldb][Windows] Clear stale thread stop info on resume (PR #201595)

via lldb-commits lldb-commits at lists.llvm.org
Thu Jun 4 07:12:59 PDT 2026


llvmorg-github-actions[bot] wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-lldb

Author: Charles Zablit (charles-zablit)

<details>
<summary>Changes</summary>

Currently, a thread that didn't participate in the next stop carries its old reason across a continue.

This patch mirrors the `NativeThreadLinux::Resume` implementation by resetting `m_stop` and clearing `m_stop_description`.

When running the test suite with `LLDB_USE_LLDB_SERVER=1`, this fixes:
- `TestThreadSpecificBreakpoint.py`
- `TestIgnoreSuspendedThread.py`
- `TestDAP_threads.py`

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


1 Files Affected:

- (modified) lldb/source/Plugins/Process/Windows/Common/NativeThreadWindows.cpp (+5) 


``````````diff
diff --git a/lldb/source/Plugins/Process/Windows/Common/NativeThreadWindows.cpp b/lldb/source/Plugins/Process/Windows/Common/NativeThreadWindows.cpp
index da0fe0d891d6f..f021d435efa9b 100644
--- a/lldb/source/Plugins/Process/Windows/Common/NativeThreadWindows.cpp
+++ b/lldb/source/Plugins/Process/Windows/Common/NativeThreadWindows.cpp
@@ -81,6 +81,11 @@ Status NativeThreadWindows::DoResume(lldb::StateType resume_state) {
   }
 
   if (resume_state == eStateStepping || resume_state == eStateRunning) {
+    // Clear any stop info left over from a previous stop.
+    m_stop_info = ThreadStopInfo();
+    m_stop_info.reason = lldb::eStopReasonNone;
+    m_stop_description.clear();
+
     DWORD previous_suspend_count = 0;
     HANDLE thread_handle = m_host_thread.GetNativeThread().GetSystemHandle();
     do {

``````````

</details>


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


More information about the lldb-commits mailing list