[Lldb-commits] [PATCH] D121500: [lldb] Protect the debugger's output and error stream

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Sat Mar 12 11:37:12 PST 2022


labath added a reviewer: clayborg.
labath added a comment.

Are you sure we don't want to handle this at a higher level? The way I understand it, the main reason for the existence of PrintAsync and StreamAsynchronousIO machinery is to provide precise control about when the various bits of output get printed. That's why the asynchronous output gets plumbed through the topmost iohandler and everything. In that setup, I think the right solution would be to set up some synchronization inside/near the iohandler object. If we don't want to bother with that then, we might as well ditch the StreamAsynchronousIO completely.

In D121500#3376501 <https://reviews.llvm.org/D121500#3376501>, @JDevlieghere wrote:

> Yup, that's exactly what I started doing. I'm aware of at least one offender (https://reviews.llvm.org/D121502) because I just added that. But I'll see if there are other places that can be migrated to use the Stream instead of the File.

Yeah, and I actually came very close to bringing that up (that it should be using StreamAsynchronousIO), but the patch was already submitted, and I did not want to bother with that. But if we're going to start introducing new concepts to make that work, then my calculus changes...


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D121500/new/

https://reviews.llvm.org/D121500



More information about the lldb-commits mailing list