[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 09:17:10 PST 2026


================
@@ -3200,8 +3364,13 @@ void PruneThreadPlans();
                                                    // private state thread.
   lldb::ListenerSP m_private_state_listener_sp; // This is the listener for the
                                                 // private state thread.
-  HostThread m_private_state_thread; ///< Thread ID for the thread that watches
-                                     ///internal state events
+  ///< This is filled on construction with the "main" private state which will
+  ///< be exposed to clients of this process.  It won't have a running private
+  ///< state thread until you call StartupThread.  This needs to be a pointer
+  ///< so I can transparently swap it out for the modal one, but there will
+  ///< always be a private state thread in this slot.
+  PrivateStateThread *m_current_private_state_thread;
----------------
jimingham wrote:

Yeah, at present 99.9% of all lldb sessions will never need this extra private state thread.  So I'd rather not make this till it is needed.

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


More information about the lldb-commits mailing list