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

via lldb-commits lldb-commits at lists.llvm.org
Thu May 2 21:28:11 PDT 2024


================
@@ -62,12 +62,15 @@ typedef void *thread_arg_t;             // Host thread argument type
 typedef void *thread_result_t;          // Host thread result type
 typedef void *(*thread_func_t)(void *); // Host thread function type
 typedef int pipe_t;                     // Host pipe type
+typedef int destroy_callback_token_t;   // Debugger destroy callback token type
----------------
royitaqi wrote:

I liked that the invalid token `LLDB_INVALID_DESTROY_CALLBACK_TOKEN` is -1, similar to how `std::basic_string::npos` is -1.

Technically I feel signed/unsigned are pretty much the same: they both have the same number of valid and invalid values; the positive/negative-ness of the values don't matter.

I don't have a strong opinion. Can change if you still think it will be better. In that case, I'm curious to learn your reasons - I must have missed something.

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


More information about the lldb-commits mailing list