9#ifndef LLDB_HOST_HOST_H
10#define LLDB_HOST_HOST_H
29class ProcessLaunchInfo;
30class ProcessInstanceInfo;
31class ProcessInstanceInfoMatch;
86 static llvm::Expected<HostThread>
160 typedef std::map<lldb::pid_t, bool>
TidMap;
187 const FileSpec &working_dir,
int *status_ptr,
188 int *signo_ptr, std::string *command_output,
190 bool run_in_shell =
true,
191 bool hide_stderr =
false);
203 const FileSpec &working_dir,
int *status_ptr,
204 int *signo_ptr, std::string *command_output,
206 bool run_in_shell =
true,
207 bool hide_stderr =
false);
217 int *status_ptr,
int *signo_ptr,
218 std::string *command_output,
220 bool run_in_shell =
true,
221 bool hide_stderr =
false);
233 const FileSpec &working_dir,
int *status_ptr,
234 int *signo_ptr, std::string *command_output,
236 bool run_in_shell =
true,
237 bool hide_stderr =
false);
252 static std::unique_ptr<Connection>
264 void Emit(llvm::StringRef message)
override;
266 bool isA(
const void *ClassID)
const override {
return ClassID == &
ID; }
280 llvm::StringRef Options);
A command line argument class.
A class that provides host computer information.
static Status LaunchProcess(ProcessLaunchInfo &launch_info)
Launch the process specified in launch_info.
static bool FindProcessThreads(const lldb::pid_t pid, TidMap &tids_to_attach)
static bool ResolveExecutableInBundle(FileSpec &file)
When executable files may live within a directory, where the directory represents an executable bundl...
static void SystemLog(lldb::Severity severity, llvm::StringRef message)
Emit the given message to the operating system log.
std::map< lldb::pid_t, bool > TidMap
static Status ShellExpandArguments(ProcessLaunchInfo &launch_info)
Perform expansion of the command-line for this launch info This can potentially involve wildcard expa...
static Status RunShellCommand(llvm::StringRef command, const FileSpec &working_dir, int *status_ptr, int *signo_ptr, std::string *command_output, const Timeout< std::micro > &timeout, bool run_in_shell=true, bool hide_stderr=false)
Run a shell command.
static lldb::thread_t GetCurrentThread()
Get the thread token (the one returned by ThreadCreate when the thread was created) for the calling t...
static Environment GetEnvironment()
static lldb::pid_t GetCurrentProcessID()
Get the process ID for the calling process.
static uint32_t FindProcessesImpl(const ProcessInstanceInfoMatch &match_info, ProcessInstanceInfoList &proc_infos)
static bool GetProcessInfo(lldb::pid_t pid, ProcessInstanceInfo &proc_info)
static FileSpec GetModuleFileSpecForHostAddress(const void *host_addr)
Given an address in the current process (the process that is running the LLDB code),...
std::function< void(lldb::pid_t pid, int signal, int status)> MonitorChildProcessCallback
static uint32_t FindProcesses(const ProcessInstanceInfoMatch &match_info, ProcessInstanceInfoList &proc_infos)
static std::unique_ptr< Connection > CreateDefaultConnection(llvm::StringRef url)
std::pair< lldb::pid_t, bool > TidPair
static llvm::Expected< HostThread > StartMonitoringChildProcess(const MonitorChildProcessCallback &callback, lldb::pid_t pid)
Start monitoring a child process.
static void Kill(lldb::pid_t pid, int signo)
static const char * GetSignalAsCString(int signo)
static bool IsInteractiveGraphicSession()
Check if we're running in an interactive graphical session.
static bool GetBundleDirectory(const FileSpec &file, FileSpec &bundle_directory)
If you have an executable that is in a bundle and want to get back to the bundle directory from the p...
static llvm::Error OpenFileInExternalEditor(llvm::StringRef editor, const FileSpec &file_spec, uint32_t line_no)
virtual bool isA(const void *ClassID) const
Log handler that emits log messages to the operating system log.
static bool classof(const LogHandler *obj)
bool isA(const void *ClassID) const override
void Emit(llvm::StringRef message) override
A class that represents a running process on the host machine.
bool operator!=(const Address &lhs, const Address &rhs)
bool operator==(const Address &lhs, const Address &rhs)
std::vector< ProcessInstanceInfo > ProcessInstanceInfoList
Severity
Used for expressing severity in logs and diagnostics.
WaitStatus(Type type, uint8_t status)
static WaitStatus Decode(int wstatus)