[all-commits] [llvm/llvm-project] 8e776b: Re-land "[lldb] Synchronize output through the IOH...

Jonas Devlieghere via All-commits all-commits at lists.llvm.org
Tue Mar 15 12:54:03 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8e776bb660dda6c51ce7ca6cea641db1f47aa9cf
      https://github.com/llvm/llvm-project/commit/8e776bb660dda6c51ce7ca6cea641db1f47aa9cf
  Author: Jonas Devlieghere <jonas at devlieghere.com>
  Date:   2022-03-15 (Tue, 15 Mar 2022)

  Changed paths:
    M lldb/include/lldb/Core/IOHandler.h
    M lldb/include/lldb/Host/Editline.h
    M lldb/include/lldb/Interpreter/CommandInterpreter.h
    M lldb/source/Core/IOHandler.cpp
    M lldb/source/Host/common/Editline.cpp
    M lldb/source/Interpreter/CommandInterpreter.cpp
    M lldb/unittests/Editline/EditlineTest.cpp

  Log Message:
  -----------
  Re-land "[lldb] Synchronize output through the IOHandler"

Add synchronization to the IOHandler to prevent multiple threads from
writing concurrently to the output or error stream.

A scenario where this could happen is when a thread (the default event
thread for example) is using the debugger's asynchronous stream. We
would delegate this operation to the IOHandler which might be running on
another thread. Until this patch there was nothing to synchronize the
two at the IOHandler level.

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




More information about the All-commits mailing list