[all-commits] [llvm/llvm-project] 312257: [lldb] [Process] Introduce protocol extension supp...

Michał Górny via All-commits all-commits at lists.llvm.org
Sat Apr 24 02:26:41 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 312257688eb0c09a8e6915ced2acdf0bcbbad353
      https://github.com/llvm/llvm-project/commit/312257688eb0c09a8e6915ced2acdf0bcbbad353
  Author: Michał Górny <mgorny at moritz.systems>
  Date:   2021-04-24 (Sat, 24 Apr 2021)

  Changed paths:
    M lldb/include/lldb/Host/common/NativeProcessProtocol.h
    M lldb/packages/Python/lldbsuite/test/dotest.py
    M lldb/packages/Python/lldbsuite/test/test_categories.py
    M lldb/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py
    M lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
    M lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.h
    M lldb/test/API/tools/lldb-server/TestLldbGdbServer.py

  Log Message:
  -----------
  [lldb] [Process] Introduce protocol extension support API

Introduce a NativeProcessProtocol API for indicating support for
protocol extensions and enabling them.  LLGS calls
GetSupportedExtensions() method on the process factory to determine
which extensions are supported by the plugin.  If the future is both
supported by the plugin and reported as supported by the client, LLGS
enables it and reports to the client as supported by the server.

The extension is enabled on the process instance by calling
SetEnabledExtensions() method.  This is done after qSupported exchange
(if the debugger is attached to any process), as well as after launching
or attaching to a new inferior.

The patch adds 'fork' extension corresponding to 'fork-events+'
qSupported feature and 'vfork' extension for 'vfork-events+'.  Both
features rely on 'multiprocess+' being supported as well.

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


  Commit: 6c37984ebaf4ee01df6a9b3f78e45f70dcd6fb33
      https://github.com/llvm/llvm-project/commit/6c37984ebaf4ee01df6a9b3f78e45f70dcd6fb33
  Author: Michał Górny <mgorny at moritz.systems>
  Date:   2021-04-24 (Sat, 24 Apr 2021)

  Changed paths:
    M lldb/bindings/interface/SBThread.i
    M lldb/bindings/interface/SBThreadPlan.i
    M lldb/docs/python_api_enums.rst
    M lldb/examples/python/performance.py
    M lldb/include/lldb/API/SBThread.h
    M lldb/include/lldb/API/SBThreadPlan.h
    M lldb/include/lldb/Host/Debug.h
    M lldb/include/lldb/lldb-enumerations.h
    M lldb/packages/Python/lldbsuite/test/lldbutil.py
    M lldb/source/API/SBThread.cpp
    M lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
    M lldb/source/Target/Process.cpp
    M lldb/source/Target/StackFrameList.cpp
    M lldb/source/Target/Thread.cpp
    M lldb/tools/lldb-vscode/JSONUtils.cpp
    M lldb/tools/lldb-vscode/LLDBUtils.cpp

  Log Message:
  -----------
  [lldb] [gdb-remote server] Introduce new stop reasons for fork and vfork

Introduce three new stop reasons for fork, vfork and vforkdone events.
This includes server support for serializing fork/vfork events into
gdb-remote protocol.  The stop infos for the two base events take a pair
of PID and TID for the newly forked process.

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


  Commit: bbae0c1f7b4f60e9b8ac2be24e35bec79d9b7b01
      https://github.com/llvm/llvm-project/commit/bbae0c1f7b4f60e9b8ac2be24e35bec79d9b7b01
  Author: Michał Górny <mgorny at moritz.systems>
  Date:   2021-04-24 (Sat, 24 Apr 2021)

  Changed paths:
    M lldb/include/lldb/Host/common/NativeProcessProtocol.h
    M lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
    M lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.h
    M lldb/source/Utility/StringExtractorGDBRemote.cpp
    A lldb/test/API/tools/lldb-server/TestGdbRemoteFork.py
    M lldb/test/API/tools/lldb-server/main.cpp
    M lldb/unittests/TestingSupport/Host/NativeProcessTestUtils.h

  Log Message:
  -----------
  [lldb] [llgs] Support owning and detaching extra processes

Add a NativeDelegate API to pass new processes (forks) to LLGS,
and support detaching them via the 'D' packet.  A 'D' packet without
a specific PID detaches all processes, otherwise it detaches either
the specified subprocess or the main process, depending on the passed
PID.

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


  Commit: fd0af0cf08284de79fe1a5bcfdc2dad83794dcfe
      https://github.com/llvm/llvm-project/commit/fd0af0cf08284de79fe1a5bcfdc2dad83794dcfe
  Author: Michał Górny <mgorny at moritz.systems>
  Date:   2021-04-24 (Sat, 24 Apr 2021)

  Changed paths:
    M lldb/packages/Python/lldbsuite/test/dotest.py
    M lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp
    M lldb/source/Plugins/Process/Linux/NativeProcessLinux.h
    M lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp
    M lldb/source/Plugins/Process/Linux/NativeThreadLinux.h

  Log Message:
  -----------
  [lldb] [Process/Linux] Report fork/vfork stop reason

Enable reporting fork/vfork events to the server when supported.
At this moment, this is used only to test the server code, as real
client does not report fork-events and vfork-events as supported.

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


Compare: https://github.com/llvm/llvm-project/compare/a7b7e7b1877d...fd0af0cf0828


More information about the All-commits mailing list