[Lldb-commits] [lldb] Fix the modal private state thread we use for running expressions on the private state thread (PR #179799)

via lldb-commits lldb-commits at lists.llvm.org
Thu Feb 5 10:17:40 PST 2026


================
@@ -3137,18 +3163,22 @@ Status Process::Attach(ProcessAttachInfo &attach_info) {
   if (attach_pid != LLDB_INVALID_PROCESS_ID) {
     error = WillAttachToProcessWithID(attach_pid);
     if (error.Success()) {
-      m_public_run_lock.SetRunning();
-
       // Now attach using these arguments.
       m_should_detach = true;
-      const bool restarted = false;
-      SetPublicState(eStateAttaching, restarted);
       error = DoAttachToProcessWithID(attach_pid, attach_info);
 
       if (error.Success()) {
         SetNextEventAction(new Process::AttachCompletionHandler(
             this, attach_info.GetResumeCount()));
-        StartPrivateStateThread();
+
+        StartPrivateStateThread(lldb::eStateAttaching, true);
+        if (!m_current_private_state_thread) {
+          // FIXME: We are not going to get any further here.  The only way this
----------------
jimingham wrote:

But it's no longer relevant.

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


More information about the lldb-commits mailing list