[Lldb-commits] [lldb] [lldb-dap] Ensure the IO forwarding threads are managed by the DAP object lifecycle. (PR #120457)

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Fri Dec 20 02:37:50 PST 2024


================
@@ -138,15 +140,20 @@ struct SendEventRequestHandler : public lldb::SBCommandPluginInterface {
 
 struct DAP {
   llvm::StringRef debug_adaptor_path;
+  std::optional<std::ofstream> &log;
----------------
labath wrote:

This isn't that big of an issue but I'd still consider using a plain pointer instead of a reference-to-optional. This way you're forcing the caller to store the object in an `optional<T>`, which I don't think is your goal here.

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


More information about the lldb-commits mailing list