================
@@ -1703,6 +1703,30 @@ void SBDebugger::SetDestroyCallback(
}
}
+lldb::callback_token_t SBDebugger::AddNotificationCallback(
+ lldb::NotificationType type,
+ lldb::SBNotificationCallback notification_callback, void *baton) {
+ LLDB_INSTRUMENT_VA(type, notification_callback, baton);
+
+ NotificationCallback callback = [](lldb::NotificationType type,
+ lldb::DebuggerSP debugger,
+ lldb::ExecutionContextRefSP exe_ctx,
+ void *baton, void *original_callback) {
+ SBDebugger sb_debugger(debugger);
+ lldb::SBNotificationCallback original_callback_func =
+ (lldb::SBNotificationCallback)original_callback;
----------------
labath wrote:
```suggestion
auto original_callback_func =
reinterpret_cast<lldb::SBNotificationCallback>(original_callback);
```
(use c++ cast, and avoid repeating the type)
https://github.com/llvm/llvm-project/pull/111206
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits