LLDB
mainline
|
#include <ProcessLaunchInfo.h>
Static Public Member Functions | |
static void | NoOpMonitorCallback (lldb::pid_t pid, int signal, int status) |
A Monitor callback which does not take any action on process events. More... | |
Protected Attributes | |
FileSpec | m_working_dir |
std::string | m_plugin_name |
FileSpec | m_shell |
Flags | m_flags |
std::vector< FileAction > | m_file_actions |
std::shared_ptr< PseudoTerminal > | m_pty |
uint32_t | m_resume_count = 0 |
Host::MonitorChildProcessCallback | m_monitor_callback |
std::string | m_event_data |
lldb::ListenerSP | m_listener_sp |
lldb::ListenerSP | m_hijack_listener_sp |
std::string | m_scripted_process_class_name |
StructuredData::DictionarySP | m_scripted_process_dictionary_sp |
![]() | |
FileSpec | m_executable |
std::string | m_arg0 |
Args | m_arguments |
Environment | m_environment |
uint32_t | m_uid = UINT32_MAX |
uint32_t | m_gid = UINT32_MAX |
ArchSpec | m_arch |
lldb::pid_t | m_pid = LLDB_INVALID_PROCESS_ID |
Definition at line 31 of file ProcessLaunchInfo.h.
ProcessLaunchInfo::ProcessLaunchInfo | ( | ) |
Definition at line 32 of file ProcessLaunchInfo.cpp.
ProcessLaunchInfo::ProcessLaunchInfo | ( | const FileSpec & | stdin_file_spec, |
const FileSpec & | stdout_file_spec, | ||
const FileSpec & | stderr_file_spec, | ||
const FileSpec & | working_dir, | ||
uint32_t | launch_flags | ||
) |
Definition at line 38 of file ProcessLaunchInfo.cpp.
References AppendFileAction(), lldb_private::FileAction::Open(), and SetWorkingDirectory().
bool ProcessLaunchInfo::AppendCloseFileAction | ( | int | fd | ) |
Definition at line 71 of file ProcessLaunchInfo.cpp.
References AppendFileAction(), and lldb_private::FileAction::Close().
Referenced by lldb_private::process_gdb_remote::GDBRemoteCommunication::StartDebugserverProcess().
bool ProcessLaunchInfo::AppendDuplicateFileAction | ( | int | fd, |
int | dup_fd | ||
) |
Definition at line 80 of file ProcessLaunchInfo.cpp.
References AppendFileAction(), and lldb_private::FileAction::Duplicate().
Referenced by lldb_private::Host::RunShellCommand(), and lldb_private::process_gdb_remote::GDBRemoteCommunication::StartDebugserverProcess().
|
inline |
Definition at line 40 of file ProcessLaunchInfo.h.
References m_file_actions.
Referenced by AppendCloseFileAction(), AppendDuplicateFileAction(), AppendOpenFileAction(), AppendSuppressFileAction(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerCommon::Handle_QSetSTDERR(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerCommon::Handle_QSetSTDIN(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerCommon::Handle_QSetSTDOUT(), and ProcessLaunchInfo().
bool ProcessLaunchInfo::AppendOpenFileAction | ( | int | fd, |
const FileSpec & | file_spec, | ||
bool | read, | ||
bool | write | ||
) |
Definition at line 89 of file ProcessLaunchInfo.cpp.
References AppendFileAction(), and lldb_private::FileAction::Open().
Referenced by lldb_private::TargetProperties::ErrorPathValueChangedCallback(), lldb_private::Target::FinalizeFileActions(), lldb_private::TargetProperties::InputPathValueChangedCallback(), lldb_private::TargetProperties::OutputPathValueChangedCallback(), lldb_private::Host::RunShellCommand(), and SetUpPtyRedirection().
bool ProcessLaunchInfo::AppendSuppressFileAction | ( | int | fd, |
bool | read, | ||
bool | write | ||
) |
Definition at line 99 of file ProcessLaunchInfo.cpp.
References AppendFileAction(), lldb_private::FileSystem::DEV_NULL, and lldb_private::FileAction::Open().
Referenced by lldb_private::Target::FinalizeFileActions(), lldb_private::Host::RunShellCommand(), and lldb_private::process_gdb_remote::GDBRemoteCommunication::StartDebugserverProcess().
void ProcessLaunchInfo::Clear | ( | ) |
Definition at line 164 of file ProcessLaunchInfo.cpp.
References lldb_private::ProcessInfo::Clear(), lldb_private::Flags::Clear(), lldb_private::FileSpec::Clear(), m_file_actions, m_flags, m_hijack_listener_sp, m_listener_sp, m_plugin_name, m_resume_count, m_scripted_process_class_name, m_scripted_process_dictionary_sp, m_shell, and m_working_dir.
Referenced by lldb_private::process_gdb_remote::GDBRemoteCommunicationServerPlatform::Handle_qC(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerPlatform::Handle_qProcessInfo(), and lldb_private::CommandOptionsProcessLaunch::OptionParsingStarting().
bool ProcessLaunchInfo::ConvertArgumentsForLaunchingInShell | ( | Status & | error, |
bool | will_debug, | ||
bool | first_arg_is_full_shell_command, | ||
uint32_t | num_resumes | ||
) |
Definition at line 238 of file ProcessLaunchInfo.cpp.
References lldb_private::Args::AppendArgument(), lldb_private::ArchSpec::eCore_x86_64_x86_64h, error(), lldb_private::ProcessInfo::GetArchitecture(), lldb_private::ProcessInfo::GetArguments(), lldb_private::Args::GetConstArgumentVector(), GetFlags(), lldb_private::FileSpec::GetPath(), lldb_private::Args::GetShellSafeArgument(), lldb_private::StreamString::GetString(), lldb_private::ArchSpec::GetTriple(), GetWorkingDirectory(), lldb_private::FileSpec::IsRelative(), lldb_private::ProcessInfo::m_arguments, lldb_private::ProcessInfo::m_executable, m_shell, lldb_private::Stream::Printf(), lldb_private::Stream::PutCString(), SetResumeCount(), and string().
Referenced by lldb_private::Platform::LaunchProcess(), and lldb_private::Host::RunShellCommand().
|
inline |
Definition at line 143 of file ProcessLaunchInfo.h.
References m_flags, and lldb_private::Flags::Test().
Referenced by lldb_private::ProcessAttachInfo::ProcessAttachInfo().
const FileAction * ProcessLaunchInfo::GetFileActionAtIndex | ( | size_t | idx | ) | const |
Definition at line 109 of file ProcessLaunchInfo.cpp.
References m_file_actions.
Referenced by PlatformPOSIX::DebugProcess(), lldb_private::platform_gdb_server::PlatformRemoteGDBServer::LaunchProcess(), LaunchProcessPosixSpawn(), and MakeForkActions().
const FileAction * ProcessLaunchInfo::GetFileActionForFD | ( | int | fd | ) | const |
Definition at line 115 of file ProcessLaunchInfo.cpp.
References m_file_actions.
Referenced by lldb_private::process_gdb_remote::ProcessGDBRemote::DoLaunch(), lldb_private::Target::FinalizeFileActions(), lldb_private::ProcessLauncherWindows::GetStdioHandle(), HandleFileAction(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::LaunchProcess(), LaunchProcessXPC(), MaybeLogLaunchInfo(), lldb_private::TargetProperties::SetProcessLaunchInfo(), and SetUpPtyRedirection().
|
inline |
Definition at line 64 of file ProcessLaunchInfo.h.
References m_flags.
Referenced by ConvertArgumentsForLaunchingInShell(), lldb_private::PlatformQemuUser::DebugProcess(), PlatformPOSIX::DebugProcess(), lldb_private::PlatformWindows::DebugProcess(), lldb_private::PlatformAppleSimulator::DebugProcess(), lldb_private::Platform::DebugProcess(), lldb_private::TargetProperties::DetachOnErrorValueChangedCallback(), lldb_private::TargetProperties::DisableASLRValueChangedCallback(), lldb_private::TargetProperties::DisableSTDIOValueChangedCallback(), lldb_private::process_gdb_remote::ProcessGDBRemote::DoLaunch(), lldb_private::StructuredDataDarwinLog::FilterLaunchInfo(), lldb_private::Target::FinalizeFileActions(), GetPosixspawnFlags(), lldb_private::platform_linux::PlatformLinux::GetResumeCountForLaunchInfo(), lldb_private::platform_netbsd::PlatformNetBSD::GetResumeCountForLaunchInfo(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerCommon::Handle_QSetDetachOnError(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_QSetDisableASLR(), lldb_private::TargetProperties::InheritTCCValueChangedCallback(), lldb_private::Process::Launch(), lldb_private::Target::Launch(), lldb_private::ProcessLauncherWindows::LaunchProcess(), lldb_private::MonitoringProcessLauncher::LaunchProcess(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::LaunchProcess(), lldb_private::platform_gdb_server::PlatformRemoteGDBServer::LaunchProcess(), lldb_private::ProcessDebugger::LaunchProcess(), lldb_private::Platform::LaunchProcess(), LaunchProcessPosixSpawn(), lldb_private::TargetProperties::SetProcessLaunchInfo(), and CoreSimulatorSupport::Device::Spawn().
|
inline |
Definition at line 66 of file ProcessLaunchInfo.h.
References m_flags.
|
inline |
Definition at line 131 of file ProcessLaunchInfo.h.
References m_hijack_listener_sp.
Referenced by lldb_private::PlatformQemuUser::DebugProcess(), PlatformPOSIX::DebugProcess(), lldb_private::PlatformWindows::DebugProcess(), lldb_private::platform_gdb_server::PlatformRemoteGDBServer::DebugProcess(), lldb_private::Target::Launch(), and lldb_private::ProcessAttachInfo::ProcessAttachInfo().
|
inline |
Definition at line 139 of file ProcessLaunchInfo.h.
References m_event_data.
Referenced by lldb_private::process_gdb_remote::ProcessGDBRemote::DoLaunch().
|
inline |
Definition at line 84 of file ProcessLaunchInfo.h.
References m_flags, and lldb_private::Flags::Test().
Referenced by GetPosixspawnFlags(), and lldb_private::process_gdb_remote::GDBRemoteCommunication::StartDebugserverProcess().
|
inline |
Definition at line 125 of file ProcessLaunchInfo.h.
References m_listener_sp.
Referenced by lldb_private::PlatformQemuUser::DebugProcess(), PlatformPOSIX::DebugProcess(), lldb_private::PlatformWindows::DebugProcess(), lldb_private::platform_gdb_server::PlatformRemoteGDBServer::DebugProcess(), lldb_private::Target::Launch(), and lldb_private::ProcessAttachInfo::ProcessAttachInfo().
|
inline |
Definition at line 106 of file ProcessLaunchInfo.h.
References m_monitor_callback.
Referenced by lldb_private::MonitoringProcessLauncher::LaunchProcess(), and lldb_private::process_gdb_remote::GDBRemoteCommunicationServerPlatform::LaunchProcess().
|
inline |
Definition at line 58 of file ProcessLaunchInfo.h.
References m_file_actions.
Referenced by lldb_private::platform_gdb_server::PlatformRemoteGDBServer::LaunchProcess(), LaunchProcessPosixSpawn(), and MakeForkActions().
const char * ProcessLaunchInfo::GetProcessPluginName | ( | ) | const |
Definition at line 131 of file ProcessLaunchInfo.cpp.
References m_plugin_name.
Referenced by lldb_private::PlatformWindows::DebugProcess(), lldb_private::Target::Launch(), and lldb_private::ProcessAttachInfo::ProcessAttachInfo().
|
inline |
Definition at line 122 of file ProcessLaunchInfo.h.
References m_pty.
Referenced by lldb_private::PlatformQemuUser::DebugProcess(), PlatformPOSIX::DebugProcess(), lldb_private::PlatformAppleSimulator::DebugProcess(), lldb_private::Platform::DebugProcess(), HandleFileAction(), lldb_private::process_netbsd::NativeProcessNetBSD::Factory::Launch(), lldb_private::process_freebsd::NativeProcessFreeBSD::Factory::Launch(), and lldb_private::process_linux::NativeProcessLinux::Factory::Launch().
|
inline |
Definition at line 80 of file ProcessLaunchInfo.h.
References m_resume_count.
Referenced by lldb_private::Platform::LaunchProcess(), and lldb_private::ProcessAttachInfo::ProcessAttachInfo().
|
inline |
Definition at line 151 of file ProcessLaunchInfo.h.
References m_scripted_process_class_name.
Referenced by lldb_private::Target::Launch(), and lldb_private::ScriptedMetadata::ScriptedMetadata().
|
inline |
Definition at line 160 of file ProcessLaunchInfo.h.
References m_scripted_process_dictionary_sp.
Referenced by lldb_private::Target::Launch(), and lldb_private::ScriptedMetadata::ScriptedMetadata().
const FileSpec & ProcessLaunchInfo::GetShell | ( | ) | const |
Definition at line 139 of file ProcessLaunchInfo.cpp.
References m_shell.
Referenced by lldb_private::platform_linux::PlatformLinux::GetResumeCountForLaunchInfo(), lldb_private::platform_netbsd::PlatformNetBSD::GetResumeCountForLaunchInfo(), lldb_private::PlatformDarwin::GetResumeCountForLaunchInfo(), lldb_private::Target::Launch(), lldb_private::Platform::LaunchProcess(), and LaunchProcessPosixSpawn().
|
inline |
Definition at line 90 of file ProcessLaunchInfo.h.
References m_flags, and lldb_private::Flags::Test().
const FileSpec & ProcessLaunchInfo::GetWorkingDirectory | ( | ) | const |
Definition at line 123 of file ProcessLaunchInfo.cpp.
References m_working_dir.
Referenced by ConvertArgumentsForLaunchingInShell(), lldb_private::process_gdb_remote::ProcessGDBRemote::DoLaunch(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_qGetWorkingDir(), lldb_private::ProcessLauncherWindows::LaunchProcess(), lldb_private::platform_gdb_server::PlatformRemoteGDBServer::LaunchProcess(), lldb_private::ProcessDebugger::LaunchProcess(), and LaunchProcessPosixSpawn().
|
inline |
Definition at line 147 of file ProcessLaunchInfo.h.
References m_scripted_process_class_name.
Referenced by lldb_private::Target::Launch().
bool ProcessLaunchInfo::MonitorProcess | ( | ) | const |
Definition at line 184 of file ProcessLaunchInfo.cpp.
References lldb_private::GetLog(), lldb_private::ProcessInfo::GetProcessID(), lldb_private::Host, LLDB_LOG, m_monitor_callback, lldb_private::ProcessInfo::ProcessIDIsValid(), lldb_private::Host::StartMonitoringChildProcess(), and lldb_private::toString().
|
static |
A Monitor callback which does not take any action on process events.
Use this if you don't need to take any particular action when the process terminates, but you still need to reap it.
Definition at line 178 of file ProcessLaunchInfo.cpp.
References lldb_private::GetLog(), LLDB_LOG, and lldb_private::Process.
void ProcessLaunchInfo::SetDetachOnError | ( | bool | enable | ) |
Definition at line 196 of file ProcessLaunchInfo.cpp.
References lldb_private::Flags::Clear(), m_flags, and lldb_private::Flags::Set().
|
inline |
Definition at line 133 of file ProcessLaunchInfo.h.
References m_hijack_listener_sp.
Referenced by lldb_private::PlatformAppleSimulator::DebugProcess(), lldb_private::Platform::DebugProcess(), and lldb_private::Target::Launch().
|
inline |
Definition at line 137 of file ProcessLaunchInfo.h.
References m_event_data.
void ProcessLaunchInfo::SetLaunchInSeparateProcessGroup | ( | bool | separate | ) |
Definition at line 150 of file ProcessLaunchInfo.cpp.
References lldb_private::Flags::Clear(), m_flags, separate(), and lldb_private::Flags::Set().
Referenced by lldb_private::PlatformQemuUser::DebugProcess(), PlatformPOSIX::DebugProcess(), lldb_private::PlatformAppleSimulator::DebugProcess(), lldb_private::Platform::DebugProcess(), lldb_private::process_gdb_remote::ProcessGDBRemote::LaunchAndConnectToDebugserver(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerPlatform::LaunchGDBServer(), and lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::LaunchProcess().
|
inline |
Definition at line 127 of file ProcessLaunchInfo.h.
References m_listener_sp.
Referenced by lldb::SBTarget::Launch().
|
inline |
Definition at line 102 of file ProcessLaunchInfo.h.
References m_monitor_callback.
Referenced by lldb_private::PlatformQemuUser::DebugProcess(), lldb_private::PlatformDarwin::DebugProcess(), lldb_private::process_gdb_remote::ProcessGDBRemote::LaunchAndConnectToDebugserver(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerPlatform::LaunchGDBServer(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerPlatform::LaunchProcess(), and lldb_private::Host::RunShellCommand().
void ProcessLaunchInfo::SetProcessPluginName | ( | llvm::StringRef | plugin | ) |
Definition at line 135 of file ProcessLaunchInfo.cpp.
References m_plugin_name, and string().
Referenced by lldb_private::Target::Launch().
|
inline |
Definition at line 82 of file ProcessLaunchInfo.h.
References m_resume_count.
Referenced by ConvertArgumentsForLaunchingInShell().
|
inline |
Definition at line 155 of file ProcessLaunchInfo.h.
References m_scripted_process_class_name.
Referenced by lldb_private::Target::Launch().
|
inline |
Definition at line 164 of file ProcessLaunchInfo.h.
References m_scripted_process_dictionary_sp.
Referenced by lldb_private::Target::Launch().
void ProcessLaunchInfo::SetShell | ( | const FileSpec & | shell | ) |
Definition at line 141 of file ProcessLaunchInfo.cpp.
References lldb_private::Flags::Clear(), lldb_private::FileSystem::Instance(), m_flags, m_shell, lldb_private::FileSystem::ResolveExecutableLocation(), and lldb_private::Flags::Set().
Referenced by lldb_private::Host::RunShellCommand().
void ProcessLaunchInfo::SetShellExpandArguments | ( | bool | expand | ) |
Definition at line 157 of file ProcessLaunchInfo.cpp.
References lldb_private::Flags::Clear(), m_flags, and lldb_private::Flags::Set().
llvm::Error ProcessLaunchInfo::SetUpPtyRedirection | ( | ) |
Definition at line 203 of file ProcessLaunchInfo.cpp.
References AppendOpenFileAction(), GetFileActionForFD(), lldb_private::GetLog(), LLDB_LOG, m_pty, O_NOCTTY, and lldb_private::Process.
Referenced by lldb_private::PlatformQemuUser::DebugProcess(), lldb_private::Target::FinalizeFileActions(), and lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::LaunchProcess().
void ProcessLaunchInfo::SetWorkingDirectory | ( | const FileSpec & | working_dir | ) |
Definition at line 127 of file ProcessLaunchInfo.cpp.
References m_working_dir.
Referenced by lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_QSetWorkingDir(), ProcessLaunchInfo(), and lldb_private::Host::RunShellCommand().
|
protected |
Definition at line 178 of file ProcessLaunchInfo.h.
Referenced by GetLaunchEventData(), and SetLaunchEventData().
|
protected |
Definition at line 174 of file ProcessLaunchInfo.h.
Referenced by AppendFileAction(), Clear(), GetFileActionAtIndex(), GetFileActionForFD(), and GetNumFileActions().
|
protected |
Definition at line 173 of file ProcessLaunchInfo.h.
Referenced by Clear(), GetDetachOnError(), GetFlags(), GetLaunchInSeparateProcessGroup(), GetShellExpandArguments(), SetDetachOnError(), SetLaunchInSeparateProcessGroup(), SetShell(), and SetShellExpandArguments().
|
protected |
Definition at line 181 of file ProcessLaunchInfo.h.
Referenced by Clear(), GetHijackListener(), and SetHijackListener().
|
protected |
Definition at line 180 of file ProcessLaunchInfo.h.
Referenced by Clear(), GetListener(), and SetListener().
|
protected |
Definition at line 177 of file ProcessLaunchInfo.h.
Referenced by GetMonitorProcessCallback(), MonitorProcess(), and SetMonitorProcessCallback().
|
protected |
Definition at line 171 of file ProcessLaunchInfo.h.
Referenced by Clear(), GetProcessPluginName(), and SetProcessPluginName().
|
protected |
Definition at line 175 of file ProcessLaunchInfo.h.
Referenced by GetPTY(), and SetUpPtyRedirection().
|
protected |
Definition at line 176 of file ProcessLaunchInfo.h.
Referenced by Clear(), GetResumeCount(), and SetResumeCount().
|
protected |
Definition at line 182 of file ProcessLaunchInfo.h.
Referenced by Clear(), GetScriptedProcessClassName(), IsScriptedProcess(), and SetScriptedProcessClassName().
|
protected |
Definition at line 185 of file ProcessLaunchInfo.h.
Referenced by Clear(), GetScriptedProcessDictionarySP(), and SetScriptedProcessDictionarySP().
|
protected |
Definition at line 172 of file ProcessLaunchInfo.h.
Referenced by Clear(), ConvertArgumentsForLaunchingInShell(), GetShell(), and SetShell().
|
protected |
Definition at line 170 of file ProcessLaunchInfo.h.
Referenced by Clear(), GetWorkingDirectory(), and SetWorkingDirectory().