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 localhost, bool will_debug, bool first_arg_is_full_shell_command, int32_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
 
- 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
 
size_t GetNameLength () 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
 
Host::MonitorChildProcessCallback m_monitor_callback
 
void * m_monitor_callback_baton
 
bool m_monitor_signals
 
std::string m_event_data
 
lldb::ListenerSP m_listener_sp
 
lldb::ListenerSP m_hijack_listener_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_t m_gid
 
ArchSpec m_arch
 
lldb::pid_t m_pid
 

Detailed Description

Definition at line 30 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  localhost,
bool  will_debug,
bool  first_arg_is_full_shell_command,
int32_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 63 of file ProcessLaunchInfo.h.

References m_flags.

Referenced by lldb_private::Target::Attach(), ChildFunc(), ConvertArgumentsForLaunchingInShell(), PlatformAppleSimulator::DebugProcess(), lldb_private::platform_netbsd::PlatformNetBSD::DebugProcess(), lldb_private::PlatformWindows::DebugProcess(), lldb_private::platform_linux::PlatformLinux::DebugProcess(), lldb_private::Platform::DebugProcess(), DisableASLRIfRequested(), lldb_private::ProcessWindows::DoLaunch(), lldb_private::process_gdb_remote::ProcessGDBRemote::DoLaunch(), 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::Target::Launch(), lldb_private::Process::Launch(), LaunchInNewTerminalWithAppleScript(), lldb_private::ProcessLauncherWindows::LaunchProcess(), lldb_private::MonitoringProcessLauncher::LaunchProcess(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::LaunchProcess(), lldb_private::platform_gdb_server::PlatformRemoteGDBServer::LaunchProcess(), lldb_private::Platform::LaunchProcess(), lldb_private::darwin_process_launcher::PosixSpawnChildForPTraceDebugging(), lldb_private::TargetProperties::SetProcessLaunchInfo(), lldb_private::TargetProperties::SetRequireHardwareBreakpoints(), ShouldLaunchUsingXPC(), CoreSimulatorSupport::Device::Spawn(), and lldb_private::StructuredDataDarwinLog::~StructuredDataDarwinLog().

◆ GetFlags() [2/2]

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

◆ 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

◆ GetShell()

const FileSpec & ProcessLaunchInfo::GetShell ( ) const

◆ GetShellExpandArguments()

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

◆ GetWorkingDirectory()

const FileSpec & ProcessLaunchInfo::GetWorkingDirectory ( ) const

◆ 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 182 of file ProcessLaunchInfo.cpp.

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

Referenced by GetMonitorProcessCallback().

◆ 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 135 of file ProcessLaunchInfo.cpp.

References m_plugin_name.

Referenced by GetFlags().

◆ SetResumeCount()

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

Definition at line 81 of file ProcessLaunchInfo.h.

References m_resume_count.

Referenced by ConvertArgumentsForLaunchingInShell().

◆ 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 161 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 164 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 163 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
protected

Definition at line 159 of file ProcessLaunchInfo.h.

◆ m_monitor_signals

bool lldb_private::ProcessLaunchInfo::m_monitor_signals
protected

◆ m_plugin_name

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

Definition at line 152 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 156 of file ProcessLaunchInfo.h.

Referenced by GetPTY(), and SetUpPtyRedirection().

◆ m_resume_count

uint32_t lldb_private::ProcessLaunchInfo::m_resume_count
protected

Definition at line 157 of file ProcessLaunchInfo.h.

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

◆ m_shell

FileSpec lldb_private::ProcessLaunchInfo::m_shell
protected

◆ m_working_dir

FileSpec lldb_private::ProcessLaunchInfo::m_working_dir
protected

Definition at line 151 of file ProcessLaunchInfo.h.

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


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