[Lldb-commits] [lldb] Add SBDebugger:: AddNotificationCallback API (PR #111206)
Zequan Wu via lldb-commits
lldb-commits at lists.llvm.org
Tue Oct 22 15:11:14 PDT 2024
================
@@ -737,19 +752,35 @@ class Debugger : public std::enable_shared_from_this<Debugger>,
lldb::TargetSP m_dummy_target_sp;
Diagnostics::CallbackID m_diagnostics_callback_id;
- std::mutex m_destroy_callback_mutex;
- lldb::callback_token_t m_destroy_callback_next_token = 0;
- struct DestroyCallbackInfo {
- DestroyCallbackInfo() {}
- DestroyCallbackInfo(lldb::callback_token_t token,
- lldb_private::DebuggerDestroyCallback callback,
- void *baton)
+ template <typename T> struct CallbackInfo {
----------------
ZequanWu wrote:
IIUC, `CallbackInfo` is the base template callback class for all kinds of callback (debugger create/destroy, and some other callbacks to be added in the future). It's better to place it somewhere else to make easier to extended in the future.
https://github.com/llvm/llvm-project/pull/111206
More information about the lldb-commits
mailing list