diff options
author | Pavel Labath <labath@google.com> | 2017-12-18 14:31:39 +0000 |
---|---|---|
committer | Pavel Labath <labath@google.com> | 2017-12-18 14:31:39 +0000 |
commit | 11e5917d2aecff32546644e91132f8efb565b4c9 (patch) | |
tree | 307da454cc4de73ee6af09e2b6a10badf4067e81 /lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.h | |
parent | 1acab00229576cdb8ba5972d3794dfcc76282c08 (diff) | |
download | bcm5719-llvm-11e5917d2aecff32546644e91132f8efb565b4c9.tar.gz bcm5719-llvm-11e5917d2aecff32546644e91132f8efb565b4c9.zip |
llgs: Propagate the environment when launching the inferior from command line
Summary:
We were failing to propagate the environment when lldb-server was
started with a pre-loaded process
(e.g.: lldb-server gdbserver -- inferior --inferior_args)
This patch makes sure the environment is propagated. Instead of adding a
new GDBRemoteCommunicationServerLLGS::SetLaunchEnvironment function to
complement SetLaunchArgs and SetLaunchFlags, I replace these with a
more generic SetLaunchInfo, which can be used to set any launch-related
property.
The accompanying test also verifies that the server correctly terminates
the connection after sending the exit packet (specifically, that it does
not send the exit packet twice).
Reviewers: clayborg, eugene
Subscribers: lldb-commits, mgorny
Differential Revision: https://reviews.llvm.org/D41070
llvm-svn: 320984
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.h')
-rw-r--r-- | lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.h | 27 |
1 files changed, 1 insertions, 26 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.h b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.h index 7deee4b953c..5a74d1acaa2 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.h +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.h @@ -43,32 +43,7 @@ public: MainLoop &mainloop, const NativeProcessProtocol::Factory &process_factory); - //------------------------------------------------------------------ - /// Specify the program to launch and its arguments. - /// - /// @param[in] args - /// The command line to launch. - /// - /// @param[in] argc - /// The number of elements in the args array of cstring pointers. - /// - /// @return - /// An Status object indicating the success or failure of making - /// the setting. - //------------------------------------------------------------------ - Status SetLaunchArguments(const char *const args[], int argc); - - //------------------------------------------------------------------ - /// Specify the launch flags for the process. - /// - /// @param[in] launch_flags - /// The launch flags to use when launching this process. - /// - /// @return - /// An Status object indicating the success or failure of making - /// the setting. - //------------------------------------------------------------------ - Status SetLaunchFlags(unsigned int launch_flags); + void SetLaunchInfo(const ProcessLaunchInfo &info); //------------------------------------------------------------------ /// Launch a process with the current launch settings. |