[Lldb-commits] [PATCH] D143520: Add a new SBDebugger::SetDestroyCallback() API

Greg Clayton via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Mar 6 09:47:43 PST 2023


clayborg added a comment.

Just change HandleDestroryCallback to a member function and this is good to go.



================
Comment at: lldb/source/Core/Debugger.cpp:688-694
+void Debugger::HandleDestroyCallback(const DebuggerSP &debugger_sp) {
+  if (debugger_sp->m_destroy_callback) {
+    debugger_sp->m_destroy_callback(debugger_sp->GetID(),
+                                    debugger_sp->m_destroy_callback_baton);
+    debugger_sp->m_destroy_callback = nullptr;
+  }
+}
----------------
This should be a member function instead of a static function that takes a debugger_sp an argument.


================
Comment at: lldb/source/Core/Debugger.cpp:700
 
+  HandleDestroyCallback(debugger_sp);
   CommandInterpreter &cmd_interpreter = debugger_sp->GetCommandInterpreter();
----------------



Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D143520/new/

https://reviews.llvm.org/D143520



More information about the lldb-commits mailing list