[Lldb-commits] [lldb] SBDebugger: Add new APIs `AddDestroyCallback` and `RemoveDestroyCallback` (PR #89868)
via lldb-commits
lldb-commits at lists.llvm.org
Mon May 20 14:56:14 PDT 2024
================
@@ -731,8 +747,12 @@ 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::mutex m_destroy_callback_mutex;
+ lldb::destroy_callback_token_t m_destroy_callback_next_token = 0;
+ typedef std::tuple<lldb::destroy_callback_token_t,
+ lldb_private::DebuggerDestroyCallback, void *>
----------------
royitaqi wrote:
Added.
FWIW, I had to add two ctors:
- Default ctor for `DestroyCallbackInfo callback_info;`, used in `HandleDestroyCallback()`.
- A ctor which assigns 3 members for `m_destroy_callbacks.emplace_back(token, destroy_callback, baton);`, used in `AddDestroyCallback()`.
https://github.com/llvm/llvm-project/pull/89868
More information about the lldb-commits
mailing list