[Lldb-commits] [lldb] Allow multiple destroy callbacks in `SBDebugger::SetDestroyCallback()` (PR #89868)
via lldb-commits
lldb-commits at lists.llvm.org
Fri Apr 26 09:26:25 PDT 2024
================
@@ -321,8 +321,15 @@ class LLDB_API SBDebugger {
void SetLoggingCallback(lldb::LogOutputCallback log_callback, void *baton);
- void SetDestroyCallback(lldb::SBDebuggerDestroyCallback destroy_callback,
- void *baton);
+ lldb::SBDebuggerDestroyCallbackToken
+ AddDestroyCallback(lldb::SBDebuggerDestroyCallback destroy_callback,
+ void *baton);
+
+ lldb::SBDebuggerDestroyCallbackToken
+ SetDestroyCallback(lldb::SBDebuggerDestroyCallback destroy_callback,
----------------
jimingham wrote:
Formally, returning the token from SetDestroyCallback is a reasonable addition, but it changes the signature of an extant SB API, which we don't allow - we are strict about maintaining backwards compatibility of the SB API's. Since we're deprecating this API anyway, I don't think we need to make Set play well with the Add/Remove model. Just leave it returning void.
https://github.com/llvm/llvm-project/pull/89868
More information about the lldb-commits
mailing list