[Lldb-commits] [PATCH] D75454: [lldb] Make sure we don't drop asynchronous output when sourcing files

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Mar 3 02:40:01 PST 2020


This revision was automatically updated to reflect the committed changes.
Closed by commit rG4deea65249d5: [lldb] Make sure we don't drop asynchronous output when sourcing files (authored by labath).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D75454

Files:
  lldb/source/Core/IOHandler.cpp
  lldb/test/Shell/Commands/command-thread-select.test


Index: lldb/test/Shell/Commands/command-thread-select.test
===================================================================
--- /dev/null
+++ lldb/test/Shell/Commands/command-thread-select.test
@@ -0,0 +1,17 @@
+# RUN: %clang_host -g %S/Inputs/main.c -o %t
+# RUN: %lldb %t -s %s -o exit | FileCheck %s
+
+b main
+# CHECK-LABEL: b main
+# CHECK: Breakpoint 1: where = {{.*}}`main
+
+run
+# CHECK-LABEL: run
+# CHECK: Process {{.*}} stopped
+# CHECK: stop reason = breakpoint 1
+# CHECK:   frame #0: {{.*}}`main at main.c
+
+thread select 1
+# CHECK-LABEL: thread select 1
+# CHECK: stop reason = breakpoint 1
+# CHECK:   frame #0: {{.*}}`main at main.c
Index: lldb/source/Core/IOHandler.cpp
===================================================================
--- lldb/source/Core/IOHandler.cpp
+++ lldb/source/Core/IOHandler.cpp
@@ -125,6 +125,8 @@
     std::lock_guard<std::recursive_mutex> guard(m_mutex);
     if (m_top)
       m_top->PrintAsync(stream, s, len);
+    else
+      stream->Write(s, len);
   }
 }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D75454.247835.patch
Type: text/x-patch
Size: 1019 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20200303/c3a37fe1/attachment.bin>


More information about the lldb-commits mailing list