[all-commits] [llvm/llvm-project] 58d28b: [lldb] [lldb-gdbserver] Unify listen/connect code ...

Michał Górny via All-commits all-commits at lists.llvm.org
Tue Oct 26 04:06:38 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 58d28b931f92f5ea2a6a01e088b794ee6ebd05e7
      https://github.com/llvm/llvm-project/commit/58d28b931f92f5ea2a6a01e088b794ee6ebd05e7
  Author: Michał Górny <mgorny at moritz.systems>
  Date:   2021-10-26 (Tue, 26 Oct 2021)

  Changed paths:
    M lldb/include/lldb/Host/posix/ConnectionFileDescriptorPosix.h
    M lldb/source/Host/posix/ConnectionFileDescriptorPosix.cpp
    M lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
    M lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.h
    A lldb/test/API/tools/lldb-server/TestPtyServer.py
    M lldb/tools/lldb-server/lldb-gdbserver.cpp
    M lldb/unittests/Process/gdb-remote/CMakeLists.txt
    A lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationServerLLGSTest.cpp

  Log Message:
  -----------
  [lldb] [lldb-gdbserver] Unify listen/connect code to use ConnectionFileDescriptor

Unify the listen and connect code inside lldb-server to use
ConnectionFileDescriptor uniformly rather than a mix of it and Acceptor.
This involves:

- adding a function to map legacy values of host:port parameter
  (including legacy server URLs) into CFD-style URLs

- adding a callback to return "local socket id" (i.e. UNIX socket path
  or TCP port number) between listen() and accept() calls in CFD

- adding a "unix-abstract-accept" scheme to CFD

As an additional advantage, this permits lldb-server to accept any URL
known to CFD including the new serial:// scheme.  Effectively,
lldb-server can now listen on the serial port.  Tests for connecting
over a pty are added to test that.

Differential Revision: https://reviews.llvm.org/D111964




More information about the All-commits mailing list