[all-commits] [llvm/llvm-project] addb51: [lldb/Target] Add custom interpreter option to `pl...

Med Ismail Bennani via All-commits all-commits at lists.llvm.org
Wed Sep 2 07:38:01 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: addb5148f58d710fcaba04bb2afec8006ae8ac15
      https://github.com/llvm/llvm-project/commit/addb5148f58d710fcaba04bb2afec8006ae8ac15
  Author: Med Ismail Bennani <medismail.bennani at gmail.com>
  Date:   2020-09-02 (Wed, 02 Sep 2020)

  Changed paths:
    M lldb/bindings/interface/SBPlatform.i
    M lldb/include/lldb/API/SBPlatform.h
    M lldb/include/lldb/Host/Host.h
    M lldb/include/lldb/Target/Platform.h
    M lldb/include/lldb/Target/RemoteAwarePlatform.h
    M lldb/source/API/SBPlatform.cpp
    M lldb/source/Commands/CommandObjectPlatform.cpp
    M lldb/source/Commands/Options.td
    M lldb/source/Host/common/Host.cpp
    M lldb/source/Host/macosx/objcxx/Host.mm
    M lldb/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp
    M lldb/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.h
    M lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
    M lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h
    M lldb/source/Target/Platform.cpp
    M lldb/source/Target/RemoteAwarePlatform.cpp
    A lldb/test/API/commands/platform/basic/Makefile
    M lldb/test/API/commands/platform/basic/TestPlatformCommand.py
    M lldb/test/API/commands/platform/basic/TestPlatformPython.py
    A lldb/test/API/commands/platform/basic/myshell.c

  Log Message:
  -----------
  [lldb/Target] Add custom interpreter option to `platform shell`

This patch adds the ability to use a custom interpreter with the
`platform shell` command. If the user set the `-s|--shell` option
with the path to a binary, lldb passes it down to the platform's
`RunShellProcess` method and set it as the shell to use in
`ProcessLaunchInfo to run commands.

Note that not all the Platforms support running shell commands with
custom interpreters (i.e. RemoteGDBServer is only expected to use the
default shell).

This patch also makes some refactoring and cleanups, like swapping
CString for StringRef when possible and updating `SBPlatformShellCommand`
with new methods and a new constructor.

rdar://67759256

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

Signed-off-by: Med Ismail Bennani <medismail.bennani at gmail.com>




More information about the All-commits mailing list