16#include "llvm/Support/FileSystem.h"
22 std::unique_ptr<ProcessLauncher> delegate_launcher)
23 : m_delegate_launcher(std::move(delegate_launcher)) {}
41 if (!fs.
Exists(exe_spec)) {
43 "executable doesn't exist: '{0}'", exe_spec);
48 assert(!resolved_info.
GetFlags().
Test(eLaunchFlagLaunchInTTY));
57 llvm::Expected<HostThread> maybe_thread =
61 "failed to launch host thread: {}",
62 llvm::toString(maybe_thread.takeError()));
64 log->
PutCString(
"started monitoring child process.");
static llvm::raw_ostream & error(Stream &strm)
void Resolve(llvm::SmallVectorImpl< char > &path)
Resolve path to make it canonical.
bool ResolveExecutableLocation(FileSpec &file_spec)
Call into the Host to see if it can help find the file.
bool Exists(const FileSpec &file_spec) const
Returns whether the given file exists.
static FileSystem & Instance()
bool Test(ValueType bit) const
Test a single flag bit.
lldb::pid_t GetProcessId() const
llvm::Expected< HostThread > StartMonitoring(const Host::MonitorChildProcessCallback &callback)
void PutCString(const char *cstr)
std::unique_ptr< ProcessLauncher > m_delegate_launcher
HostProcess LaunchProcess(const ProcessLaunchInfo &launch_info, Status &error) override
Launch the process specified in launch_info.
MonitoringProcessLauncher(std::unique_ptr< ProcessLauncher > delegate_launcher)
void SetExecutableFile(const FileSpec &exe_file, bool add_exe_file_as_first_arg)
FileSpec & GetExecutableFile()
const Host::MonitorChildProcessCallback & GetMonitorProcessCallback() const
static Status FromErrorString(const char *str)
static Status static Status FromErrorStringWithFormatv(const char *format, Args &&...args)
#define LLDB_INVALID_PROCESS_ID
A class that represents a running process on the host machine.
Log * GetLog(Cat mask)
Retrieve the Log object for the channel associated with the given log enum.