diff options
author | Pavel Labath <labath@google.com> | 2018-05-14 15:13:13 +0000 |
---|---|---|
committer | Pavel Labath <labath@google.com> | 2018-05-14 15:13:13 +0000 |
commit | 58b54894c7b66a565e9dcf5236ff1425ab8053dc (patch) | |
tree | e88eaf8b251c89f72084bf4650f0b46883eaec65 /lldb/unittests/tools/lldb-server/tests/TestClient.cpp | |
parent | 8ea3a34e390fd6b5a5754ab28a455cfac04e324b (diff) | |
download | bcm5719-llvm-58b54894c7b66a565e9dcf5236ff1425ab8053dc.tar.gz bcm5719-llvm-58b54894c7b66a565e9dcf5236ff1425ab8053dc.zip |
Remove Process references from the Host module
The Process class was only being referenced because of the last-ditch
effort in the process launchers to set a process death callback in case
one isn't set already.
Although launching a process for debugging is the most important kind of
"launch" we are doing, it is by far not the only one, so assuming this
particular callback is the one to be used is not a good idea (besides
breaking layering). Instead of assuming a particular exit callback, I
change the launcher code to require the callback to be set by the user (and fix
up the two call sites which did not set the callback already).
Reviewers: jingham, davide
Subscribers: lldb-commits
Differential Revision: https://reviews.llvm.org/D46395
llvm-svn: 332250
Diffstat (limited to 'lldb/unittests/tools/lldb-server/tests/TestClient.cpp')
-rw-r--r-- | lldb/unittests/tools/lldb-server/tests/TestClient.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lldb/unittests/tools/lldb-server/tests/TestClient.cpp b/lldb/unittests/tools/lldb-server/tests/TestClient.cpp index 2410b6270f2..3dd5be2c6e8 100644 --- a/lldb/unittests/tools/lldb-server/tests/TestClient.cpp +++ b/lldb/unittests/tools/lldb-server/tests/TestClient.cpp @@ -97,6 +97,11 @@ Expected<std::unique_ptr<TestClient>> TestClient::launchCustom(StringRef Log, Ar Info.SetArchitecture(arch_spec); Info.SetArguments(args, true); Info.GetEnvironment() = Host::GetEnvironment(); + // TODO: Use this callback to detect botched launches. If lldb-server does not + // start, we can print a nice error message here instead of hanging in + // Accept(). + Info.SetMonitorProcessCallback(&ProcessLaunchInfo::NoOpMonitorCallback, + false); status = Host::LaunchProcess(Info); if (status.Fail()) |