9#ifndef LLDB_HOST_HOST_H
10#define LLDB_HOST_HOST_H
29class ProcessLaunchInfo;
30class ProcessInstanceInfo;
31class ProcessInstanceInfoMatch;
39 System = Log::ChannelFlag<0>,
105 static llvm::Expected<HostThread>
179 typedef std::map<lldb::pid_t, bool>
TidMap;
206 const FileSpec &working_dir,
int *status_ptr,
207 int *signo_ptr, std::string *command_output,
209 bool run_in_shell =
true,
210 bool hide_stderr =
false);
222 const FileSpec &working_dir,
int *status_ptr,
223 int *signo_ptr, std::string *command_output,
225 bool run_in_shell =
true,
226 bool hide_stderr =
false);
236 int *status_ptr,
int *signo_ptr,
237 std::string *command_output,
239 bool run_in_shell =
true,
240 bool hide_stderr =
false);
252 const FileSpec &working_dir,
int *status_ptr,
253 int *signo_ptr, std::string *command_output,
255 bool run_in_shell =
true,
256 bool hide_stderr =
false);
271 static std::unique_ptr<Connection>
283 void Emit(llvm::StringRef message)
override;
285 bool isA(
const void *ClassID)
const override {
return ClassID == &
ID; }
299 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...
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
uint64_t MaskType
The underlying type of all log channel enums.
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.
@ LLVM_MARK_AS_BITMASK_ENUM
bool operator!=(const Address &lhs, const Address &rhs)
Log::Channel & LogChannelFor< SystemLog >()
LLVM_ENABLE_BITMASK_ENUMS_IN_NAMESPACE()
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)