[Lldb-commits] [lldb] SBDebugger: Add new APIs `AddDestroyCallback` and `RemoveDestroyCallback` (PR #89868)

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Thu May 2 09:21:23 PDT 2024


================
@@ -321,9 +321,26 @@ class LLDB_API SBDebugger {
 
   void SetLoggingCallback(lldb::LogOutputCallback log_callback, void *baton);
 
+  /// DEPRECATED: We used to only support one Destroy callback. Now that we
+  /// support Add and Remove, you should only remove Destroy callbacks that
+  /// you Add-ed. Use Add and Remove instead.
----------------
JDevlieghere wrote:

- Nit: Remove the "DEPRECATED:", that's covered by `LLDB_DEPRECATED_FIXME` below. 
- Suggestion: The "Add-ed" looks weird and you didn't write "Remove" so I would suggest  "you should only remove callbacks that you added." (which also drops the "Destroy"). I think it reads a lot easier that way. 

(We can keep the "DEPRECATED" on the private side)

https://github.com/llvm/llvm-project/pull/89868


More information about the lldb-commits mailing list