You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[lldb] Synchronize Debugger's stdout and stderr at the StreamFile level
This patch moves the synchronization for the Debugger's output and error
into StreamFile. Currently, the debugger's output is synchronized at the
IOHandler level. Because Debugger::PrintAsync first gives the top
IOHandler a chance to print output, that works most of the time, except
when we fall back to printing to the output and error streams directly.
By storing the mutex in the new SynchronizedStreamFile, everyone from
the Debugger level down has access to it. This should make it easier to
do the right thing. It also means we don't have to pass the mutex around
separately (e.g. between IOHandler and Editline). Locking at the
StreamFile level also eliminates a few lock guard around calls to
StreamFile::Write.
I resisted the urge to simplify the code to aid reviewing. There's
definitely some repetition in Editline that could be solved by
extracting some helper methods. I'm planning on doing that in a
follow-up.
0 commit comments