[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
Mon Dec 23 05:45:44 PST 2024
================
@@ -5030,47 +5045,81 @@ int main(int argc, char *argv[]) {
}
#endif
+ std::unique_ptr<std::ofstream> log = nullptr;
+ const char *log_file_path = getenv("LLDBDAP_LOG");
+ if (log_file_path)
+ log.reset(new std::ofstream(log_file_path));
----------------
labath wrote:
```suggestion
log = std::make_unique<std::ofstream>(log_file_path));
```
to avoid the bare `new`.
https://github.com/llvm/llvm-project/pull/120457
More information about the lldb-commits
mailing list