[Lldb-commits] [lldb] [lldb] Make GetOutputStreamSP and GetErrorStreamSP protected (PR #127682)
Pavel Labath via lldb-commits
lldb-commits at lists.llvm.org
Wed Feb 19 03:52:04 PST 2025
https://github.com/labath approved this pull request.
LGTM. I am not saying that you have to do anything about this, but there are two things that caught my eye:
- Debugger::GetOutputFileSP is now the biggest backdoor into our locking mechanism. In a way, it's even worse than GetOutputStreamSP, since it bypasses locking completely. And since it supports `Printf` I can totally see someone reaching for that without realizing the problem.
- It would sure be nice if StreamAsync was more of an RAII thing. Like, at least stored in a unique pointer, and maybe even passed by value (if we can make it movable).
https://github.com/llvm/llvm-project/pull/127682
More information about the lldb-commits
mailing list