[Lldb-commits] [lldb] [lldb] Synchronize Debugger's stdout and stderr at the StreamFile level (PR #126630)

Alex Langford via lldb-commits lldb-commits at lists.llvm.org
Mon Feb 10 16:56:00 PST 2025


================
@@ -393,7 +394,7 @@ void Editline::MoveCursor(CursorLocation from, CursorLocation to) {
   int fromLine = GetLineIndexForLocation(from, editline_cursor_row);
   int toLine = GetLineIndexForLocation(to, editline_cursor_row);
   if (toLine != fromLine) {
-    fprintf(m_output_file,
+    fprintf(m_output_stream_sp->GetFile().GetStream(),
----------------
bulbazord wrote:

There are a lot of unguarded calls to `fprintf` and `fputs` in this file. Are there some guarantees about the state of the synchronized stream when these functions are executed? Or do we just have tons of unsynchronized writes to the output stream? :D 

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


More information about the lldb-commits mailing list