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); } }
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); } }
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits