================ @@ -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; + SBExecutionContext sb_exe_ctx(exe_ctx); + original_callback_func(type, sb_debugger, sb_exe_ctx, baton); + }; + return Debugger::AddNotificationCallback(type, callback, baton, + (void *)notification_callback); ---------------- labath wrote:
same here https://github.com/llvm/llvm-project/pull/111206 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits