Author: Jonas Devlieghere
Date: 2022-05-03T15:11:57-07:00
New Revision: 3d08c778c01e1577752762da8c980db32b4e6d55

URL: 
https://github.com/llvm/llvm-project/commit/3d08c778c01e1577752762da8c980db32b4e6d55
DIFF: 
https://github.com/llvm/llvm-project/commit/3d08c778c01e1577752762da8c980db32b4e6d55.diff

LOG: [lldb] Session transcript should use the async debugger streams

When writing out the session transcript, print output to the
asynchronous debugger stream to prevent it from potentially interleaving
with other output.

Differential revision: https://reviews.llvm.org/D124873

Added: 
    

Modified: 
    lldb/source/Core/Debugger.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/source/Core/Debugger.cpp b/lldb/source/Core/Debugger.cpp
index e7d3d6bd8b9ac..a0785549e77ec 100644
--- a/lldb/source/Core/Debugger.cpp
+++ b/lldb/source/Core/Debugger.cpp
@@ -669,9 +669,9 @@ void Debugger::Destroy(DebuggerSP &debugger_sp) {
     CommandReturnObject result(debugger_sp->GetUseColor());
     cmd_interpreter.SaveTranscript(result);
     if (result.Succeeded())
-      debugger_sp->GetOutputStream() << result.GetOutputData() << '\n';
+      (*debugger_sp->GetAsyncOutputStream()) << result.GetOutputData() << '\n';
     else
-      debugger_sp->GetErrorStream() << result.GetErrorData() << '\n';
+      (*debugger_sp->GetAsyncErrorStream()) << result.GetErrorData() << '\n';
   }
 
   debugger_sp->Clear();


        
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to