diff --git a/lldb/source/Core/IOHandler.cpp b/lldb/source/Core/IOHandler.cpp --- a/lldb/source/Core/IOHandler.cpp +++ b/lldb/source/Core/IOHandler.cpp @@ -125,6 +125,8 @@ std::lock_guard guard(m_mutex); if (m_top) m_top->PrintAsync(stream, s, len); + else + stream->Write(s, len); } } diff --git a/lldb/test/Shell/Commands/command-thread-select.test b/lldb/test/Shell/Commands/command-thread-select.test new file mode 100644 --- /dev/null +++ b/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