================
@@ -731,8 +747,11 @@ class Debugger : public 
std::enable_shared_from_this<Debugger>,
   lldb::TargetSP m_dummy_target_sp;
   Diagnostics::CallbackID m_diagnostics_callback_id;
 
-  lldb_private::DebuggerDestroyCallback m_destroy_callback = nullptr;
-  void *m_destroy_callback_baton = nullptr;
+  std::recursive_mutex m_destroy_callback_mutex;
----------------
royitaqi wrote:

BTW:
> I think you need to at least protect adding.

To me, it's either none, or all.

If we decide to protect adding (multiple adds from different threads not during 
destroy), then we should just protect all of add/remove/destroy, because any of 
these operations can happen at the same time from multiple threads.

FWIW I agree with what @JDevlieghere said:

> I'd say let's not overthink this and if we want to change that, let's do it 
> holistically for the whole class instead of piecemeal.


https://github.com/llvm/llvm-project/pull/89868
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to