LLDB  mainline
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
lldb_private::ProcessLaunchInfo Class Reference

#include <ProcessLaunchInfo.h>

Inheritance diagram for lldb_private::ProcessLaunchInfo:
Inheritance graph
[legend]
Collaboration diagram for lldb_private::ProcessLaunchInfo:
Collaboration graph
[legend]

Public Member Functions

 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)
 
void AppendFileAction (const FileAction &info)
 
bool AppendCloseFileAction (int fd)
 
bool AppendDuplicateFileAction (int fd, int dup_fd)
 
bool AppendOpenFileAction (int fd, const FileSpec &file_spec, bool read, bool write)
 
bool AppendSuppressFileAction (int fd, bool read, bool write)
 
llvm::Error SetUpPtyRedirection ()
 
size_t GetNumFileActions () const
 
const FileActionGetFileActionAtIndex (size_t idx) const
 
const FileActionGetFileActionForFD (int fd) const
 
FlagsGetFlags ()
 
const FlagsGetFlags () const
 
const FileSpecGetWorkingDirectory () const
 
void SetWorkingDirectory (const FileSpec &working_dir)
 
const char * GetProcessPluginName () const
 
void SetProcessPluginName (llvm::StringRef plugin)
 
const FileSpecGetShell () const
 
void SetShell (const FileSpec &shell)
 
uint32_t GetResumeCount () const
 
void SetResumeCount (uint32_t c)
 
bool GetLaunchInSeparateProcessGroup () const
 
void SetLaunchInSeparateProcessGroup (bool separate)
 
bool GetShellExpandArguments () const
 
void SetShellExpandArguments (bool expand)
 
void Clear ()
 
bool ConvertArgumentsForLaunchingInShell (Status &error, bool will_debug, bool first_arg_is_full_shell_command, uint32_t num_resumes)
 
void SetMonitorProcessCallback (const Host::MonitorChildProcessCallback &callback, bool monitor_signals)
 
Host::MonitorChildProcessCallback GetMonitorProcessCallback () const
 
bool GetMonitorSignals () const
 
bool MonitorProcess () const
 
PseudoTerminalGetPTY ()
 
lldb::ListenerSP GetListener () const
 
void SetListener (const lldb::ListenerSP &listener_sp)
 
lldb::ListenerSP GetHijackListener () const
 
void SetHijackListener (const lldb::ListenerSP &listener_sp)
 
void SetLaunchEventData (const char *data)
 
const char * GetLaunchEventData () const
 
void SetDetachOnError (bool enable)
 
bool GetDetachOnError () const
 
bool IsScriptedProcess () const
 
std::string GetScriptedProcessClassName () const
 
void SetScriptedProcessClassName (std::string name)
 
lldb_private::StructuredData::DictionarySP GetScriptedProcessDictionarySP () const
 
void SetScriptedProcessDictionarySP (lldb_private::StructuredData::DictionarySP dictionary_sp)
 
- Public Member Functions inherited from lldb_private::ProcessInfo
 ProcessInfo ()
 
 ProcessInfo (const char *name, const ArchSpec &arch, lldb::pid_t pid)
 
void Clear ()
 
const char * GetName () const
 
llvm::StringRef GetNameAsStringRef () const
 
FileSpecGetExecutableFile ()
 
void SetExecutableFile (const FileSpec &exe_file, bool add_exe_file_as_first_arg)
 
const FileSpecGetExecutableFile () const
 
uint32_t GetUserID () const
 
uint32_t GetGroupID () const
 
bool UserIDIsValid () const
 
bool GroupIDIsValid () const
 
void SetUserID (uint32_t uid)
 
void SetGroupID (uint32_t gid)
 
ArchSpecGetArchitecture ()
 
const ArchSpecGetArchitecture () const
 
void SetArchitecture (const ArchSpec &arch)
 
lldb::pid_t GetProcessID () const
 
void SetProcessID (lldb::pid_t pid)
 
bool ProcessIDIsValid () const
 
void Dump (Stream &s, Platform *platform) const
 
ArgsGetArguments ()
 
const ArgsGetArguments () const
 
llvm::StringRef GetArg0 () const
 
void SetArg0 (llvm::StringRef arg)
 
void SetArguments (const Args &args, bool first_arg_is_executable)
 
void SetArguments (char const **argv, bool first_arg_is_executable)
 
EnvironmentGetEnvironment ()
 
const EnvironmentGetEnvironment () const
 

Static Public Member Functions

static bool NoOpMonitorCallback (lldb::pid_t pid, bool exited, 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< FileActionm_file_actions
 
std::shared_ptr< PseudoTerminalm_pty
 
uint32_t m_resume_count = 0
 
Host::MonitorChildProcessCallback m_monitor_callback
 
void * m_monitor_callback_baton = nullptr
 
bool m_monitor_signals = false
 
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
 
- Protected Attributes inherited from lldb_private::ProcessInfo
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
 

Detailed Description

Definition at line 31 of file ProcessLaunchInfo.h.

Constructor & Destructor Documentation

◆ ProcessLaunchInfo() [1/2]

ProcessLaunchInfo::ProcessLaunchInfo ( )

Definition at line 31 of file ProcessLaunchInfo.cpp.

◆ ProcessLaunchInfo() [2/2]

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 
)

Member Function Documentation

◆ AppendCloseFileAction()

bool ProcessLaunchInfo::AppendCloseFileAction ( int  fd)

◆ AppendDuplicateFileAction()

bool ProcessLaunchInfo::AppendDuplicateFileAction ( int  fd,
int  dup_fd 
)

◆ AppendFileAction()

void lldb_private::ProcessLaunchInfo::AppendFileAction ( const FileAction info)
inline

◆ AppendOpenFileAction()

bool ProcessLaunchInfo::AppendOpenFileAction ( int  fd,
const FileSpec file_spec,
bool  read,
bool  write 
)

◆ AppendSuppressFileAction()

bool ProcessLaunchInfo::AppendSuppressFileAction ( int  fd,
bool  read,
bool  write 
)

◆ Clear()

void ProcessLaunchInfo::Clear ( )

◆ ConvertArgumentsForLaunchingInShell()

bool ProcessLaunchInfo::ConvertArgumentsForLaunchingInShell ( Status error,
bool  will_debug,
bool  first_arg_is_full_shell_command,
uint32_t  num_resumes 
)

◆ GetDetachOnError()

bool lldb_private::ProcessLaunchInfo::GetDetachOnError ( ) const
inline

◆ GetFileActionAtIndex()

const FileAction * ProcessLaunchInfo::GetFileActionAtIndex ( size_t  idx) const

◆ GetFileActionForFD()

const FileAction * ProcessLaunchInfo::GetFileActionForFD ( int  fd) const

◆ GetFlags() [1/2]

Flags& lldb_private::ProcessLaunchInfo::GetFlags ( )
inline

Definition at line 64 of file ProcessLaunchInfo.h.

References m_flags.

Referenced by ChildFunc(), ConvertArgumentsForLaunchingInShell(), lldb_private::PlatformWindows::DebugProcess(), PlatformPOSIX::DebugProcess(), PlatformAppleSimulator::DebugProcess(), lldb_private::Platform::DebugProcess(), lldb_private::TargetProperties::DetachOnErrorValueChangedCallback(), DisableASLRIfRequested(), 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::Target::Launch(), lldb_private::Process::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().

◆ GetFlags() [2/2]

const Flags& lldb_private::ProcessLaunchInfo::GetFlags ( ) const
inline

Definition at line 66 of file ProcessLaunchInfo.h.

References m_flags.

◆ GetHijackListener()

lldb::ListenerSP lldb_private::ProcessLaunchInfo::GetHijackListener ( ) const
inline

◆ GetLaunchEventData()

const char* lldb_private::ProcessLaunchInfo::GetLaunchEventData ( ) const
inline

◆ GetLaunchInSeparateProcessGroup()

bool lldb_private::ProcessLaunchInfo::GetLaunchInSeparateProcessGroup ( ) const
inline

◆ GetListener()

lldb::ListenerSP lldb_private::ProcessLaunchInfo::GetListener ( ) const
inline

◆ GetMonitorProcessCallback()

Host::MonitorChildProcessCallback lldb_private::ProcessLaunchInfo::GetMonitorProcessCallback ( ) const
inline

◆ GetMonitorSignals()

bool lldb_private::ProcessLaunchInfo::GetMonitorSignals ( ) const
inline

◆ GetNumFileActions()

size_t lldb_private::ProcessLaunchInfo::GetNumFileActions ( ) const
inline

◆ GetProcessPluginName()

const char * ProcessLaunchInfo::GetProcessPluginName ( ) const

◆ GetPTY()

PseudoTerminal& lldb_private::ProcessLaunchInfo::GetPTY ( )
inline

◆ GetResumeCount()

uint32_t lldb_private::ProcessLaunchInfo::GetResumeCount ( ) const
inline

◆ GetScriptedProcessClassName()

std::string lldb_private::ProcessLaunchInfo::GetScriptedProcessClassName ( ) const
inline

◆ GetScriptedProcessDictionarySP()

lldb_private::StructuredData::DictionarySP lldb_private::ProcessLaunchInfo::GetScriptedProcessDictionarySP ( ) const
inline

◆ GetShell()

const FileSpec & ProcessLaunchInfo::GetShell ( ) const

◆ GetShellExpandArguments()

bool lldb_private::ProcessLaunchInfo::GetShellExpandArguments ( ) const
inline

Definition at line 90 of file ProcessLaunchInfo.h.

References m_flags, and lldb_private::Flags::Test().

◆ GetWorkingDirectory()

const FileSpec & ProcessLaunchInfo::GetWorkingDirectory ( ) const

◆ IsScriptedProcess()

bool lldb_private::ProcessLaunchInfo::IsScriptedProcess ( ) const
inline

Definition at line 150 of file ProcessLaunchInfo.h.

References m_scripted_process_class_name.

Referenced by lldb_private::Target::Launch().

◆ MonitorProcess()

bool ProcessLaunchInfo::MonitorProcess ( ) const

◆ NoOpMonitorCallback()

bool ProcessLaunchInfo::NoOpMonitorCallback ( lldb::pid_t  pid,
bool  exited,
int  signal,
int  status 
)
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 185 of file ProcessLaunchInfo.cpp.

References lldb_private::GetLogIfAllCategoriesSet(), LIBLLDB_LOG_PROCESS, and LLDB_LOG.

◆ SetDetachOnError()

void ProcessLaunchInfo::SetDetachOnError ( bool  enable)

◆ SetHijackListener()

void lldb_private::ProcessLaunchInfo::SetHijackListener ( const lldb::ListenerSP &  listener_sp)
inline

◆ SetLaunchEventData()

void lldb_private::ProcessLaunchInfo::SetLaunchEventData ( const char *  data)
inline

Definition at line 140 of file ProcessLaunchInfo.h.

References m_event_data.

◆ SetLaunchInSeparateProcessGroup()

void ProcessLaunchInfo::SetLaunchInSeparateProcessGroup ( bool  separate)

◆ SetListener()

void lldb_private::ProcessLaunchInfo::SetListener ( const lldb::ListenerSP &  listener_sp)
inline

Definition at line 130 of file ProcessLaunchInfo.h.

References m_listener_sp.

Referenced by lldb::SBTarget::Launch().

◆ SetMonitorProcessCallback()

void ProcessLaunchInfo::SetMonitorProcessCallback ( const Host::MonitorChildProcessCallback callback,
bool  monitor_signals 
)

◆ SetProcessPluginName()

void ProcessLaunchInfo::SetProcessPluginName ( llvm::StringRef  plugin)

Definition at line 136 of file ProcessLaunchInfo.cpp.

References m_plugin_name, and string().

Referenced by lldb_private::Target::Launch().

◆ SetResumeCount()

void lldb_private::ProcessLaunchInfo::SetResumeCount ( uint32_t  c)
inline

Definition at line 82 of file ProcessLaunchInfo.h.

References m_resume_count.

Referenced by ConvertArgumentsForLaunchingInShell().

◆ SetScriptedProcessClassName()

void lldb_private::ProcessLaunchInfo::SetScriptedProcessClassName ( std::string  name)
inline

Definition at line 158 of file ProcessLaunchInfo.h.

References m_scripted_process_class_name.

Referenced by lldb_private::Target::Launch().

◆ SetScriptedProcessDictionarySP()

void lldb_private::ProcessLaunchInfo::SetScriptedProcessDictionarySP ( lldb_private::StructuredData::DictionarySP  dictionary_sp)
inline

Definition at line 167 of file ProcessLaunchInfo.h.

References m_scripted_process_dictionary_sp.

Referenced by lldb_private::Target::Launch().

◆ SetShell()

void ProcessLaunchInfo::SetShell ( const FileSpec shell)

◆ SetShellExpandArguments()

void ProcessLaunchInfo::SetShellExpandArguments ( bool  expand)

◆ SetUpPtyRedirection()

llvm::Error ProcessLaunchInfo::SetUpPtyRedirection ( )

◆ SetWorkingDirectory()

void ProcessLaunchInfo::SetWorkingDirectory ( const FileSpec working_dir)

Member Data Documentation

◆ m_event_data

std::string lldb_private::ProcessLaunchInfo::m_event_data
protected

Definition at line 183 of file ProcessLaunchInfo.h.

Referenced by GetLaunchEventData(), and SetLaunchEventData().

◆ m_file_actions

std::vector<FileAction> lldb_private::ProcessLaunchInfo::m_file_actions
protected

◆ m_flags

Flags lldb_private::ProcessLaunchInfo::m_flags
protected

◆ m_hijack_listener_sp

lldb::ListenerSP lldb_private::ProcessLaunchInfo::m_hijack_listener_sp
protected

Definition at line 186 of file ProcessLaunchInfo.h.

Referenced by Clear(), GetHijackListener(), and SetHijackListener().

◆ m_listener_sp

lldb::ListenerSP lldb_private::ProcessLaunchInfo::m_listener_sp
protected

Definition at line 185 of file ProcessLaunchInfo.h.

Referenced by Clear(), GetListener(), and SetListener().

◆ m_monitor_callback

Host::MonitorChildProcessCallback lldb_private::ProcessLaunchInfo::m_monitor_callback
protected

◆ m_monitor_callback_baton

void* lldb_private::ProcessLaunchInfo::m_monitor_callback_baton = nullptr
protected

Definition at line 181 of file ProcessLaunchInfo.h.

◆ m_monitor_signals

bool lldb_private::ProcessLaunchInfo::m_monitor_signals = false
protected

◆ m_plugin_name

std::string lldb_private::ProcessLaunchInfo::m_plugin_name
protected

Definition at line 174 of file ProcessLaunchInfo.h.

Referenced by Clear(), GetProcessPluginName(), and SetProcessPluginName().

◆ m_pty

std::shared_ptr<PseudoTerminal> lldb_private::ProcessLaunchInfo::m_pty
protected

Definition at line 178 of file ProcessLaunchInfo.h.

Referenced by GetPTY(), and SetUpPtyRedirection().

◆ m_resume_count

uint32_t lldb_private::ProcessLaunchInfo::m_resume_count = 0
protected

Definition at line 179 of file ProcessLaunchInfo.h.

Referenced by Clear(), GetResumeCount(), and SetResumeCount().

◆ m_scripted_process_class_name

std::string lldb_private::ProcessLaunchInfo::m_scripted_process_class_name
protected

◆ m_scripted_process_dictionary_sp

StructuredData::DictionarySP lldb_private::ProcessLaunchInfo::m_scripted_process_dictionary_sp
protected

◆ m_shell

FileSpec lldb_private::ProcessLaunchInfo::m_shell
protected

◆ m_working_dir

FileSpec lldb_private::ProcessLaunchInfo::m_working_dir
protected

Definition at line 173 of file ProcessLaunchInfo.h.

Referenced by Clear(), GetWorkingDirectory(), and SetWorkingDirectory().


The documentation for this class was generated from the following files: