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]

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)
 
llvm::StringRef 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 (Host::MonitorChildProcessCallback callback)
 
const Host::MonitorChildProcessCallbackGetMonitorProcessCallback () const
 
bool MonitorProcess () const
 
PseudoTerminalGetPTY ()
 
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
 
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
 
bool IsScriptedProcess () const
 
lldb::ScriptedMetadataSP GetScriptedMetadata () const
 
void SetScriptedMetadata (lldb::ScriptedMetadataSP metadata_sp)
 
lldb::ListenerSP GetListener () const
 
void SetListener (const lldb::ListenerSP &listener_sp)
 
lldb::ListenerSP GetHijackListener () const
 
void SetHijackListener (const lldb::ListenerSP &listener_sp)
 
lldb::ListenerSP GetShadowListener () const
 
void SetShadowListener (const lldb::ListenerSP &listener_sp)
 

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.
 

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
 
std::string m_event_data
 
- 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
 
lldb::ScriptedMetadataSP m_scripted_metadata_sp = nullptr
 
lldb::ListenerSP m_listener_sp = nullptr
 
lldb::ListenerSP m_hijack_listener_sp = nullptr
 
lldb::ListenerSP m_shadow_listener_sp = nullptr
 

Detailed Description

Definition at line 30 of file ProcessLaunchInfo.h.

Constructor & Destructor Documentation

◆ ProcessLaunchInfo() [1/2]

ProcessLaunchInfo::ProcessLaunchInfo ( )

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

References m_flags.

Referenced by ConvertArgumentsForLaunchingInShell(), PlatformPOSIX::DebugProcess(), lldb_private::PlatformWindows::DebugProcess(), lldb_private::Platform::DebugProcess(), lldb_private::PlatformAppleSimulator::DebugProcess(), lldb_private::PlatformQemuUser::DebugProcess(), lldb_private::TargetProperties::DetachOnErrorValueChangedCallback(), lldb_private::TargetProperties::DisableASLRValueChangedCallback(), lldb_private::TargetProperties::DisableSTDIOValueChangedCallback(), CommandObjectPlatformProcessLaunch::DoExecute(), CommandObjectProcessLaunch::DoExecute(), 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::process_gdb_remote::GDBRemoteCommunicationServerLLGS::LaunchProcess(), lldb_private::MonitoringProcessLauncher::LaunchProcess(), lldb_private::ProcessLauncherWindows::LaunchProcess(), lldb_private::Platform::LaunchProcess(), lldb_private::platform_gdb_server::PlatformRemoteGDBServer::LaunchProcess(), lldb_private::ProcessDebugger::LaunchProcess(), LaunchProcessPosixSpawn(), lldb_private::CommandOptionsProcessLaunch::SetOptionValue(), lldb_private::TargetProperties::SetProcessLaunchInfo(), and CoreSimulatorSupport::Device::Spawn().

◆ GetFlags() [2/2]

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

Definition at line 65 of file ProcessLaunchInfo.h.

References m_flags.

◆ GetLaunchEventData()

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

◆ GetLaunchInSeparateProcessGroup()

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

◆ GetMonitorProcessCallback()

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

◆ GetNumFileActions()

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

◆ GetProcessPluginName()

llvm::StringRef 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

Definition at line 89 of file ProcessLaunchInfo.h.

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

◆ GetWorkingDirectory()

const FileSpec & ProcessLaunchInfo::GetWorkingDirectory ( ) const

◆ MonitorProcess()

bool ProcessLaunchInfo::MonitorProcess ( ) const

◆ NoOpMonitorCallback()

void ProcessLaunchInfo::NoOpMonitorCallback ( lldb::pid_t  pid,
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 174 of file ProcessLaunchInfo.cpp.

References lldb_private::GetLog(), LLDB_LOG, and lldb_private::Process.

Referenced by lldb_private::PlatformDarwin::DebugProcess(), and lldb_private::PlatformQemuUser::DebugProcess().

◆ SetDetachOnError()

void ProcessLaunchInfo::SetDetachOnError ( bool  enable)

◆ SetLaunchEventData()

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

Definition at line 123 of file ProcessLaunchInfo.h.

References m_event_data.

◆ SetLaunchInSeparateProcessGroup()

void ProcessLaunchInfo::SetLaunchInSeparateProcessGroup ( bool  separate)

◆ SetMonitorProcessCallback()

void lldb_private::ProcessLaunchInfo::SetMonitorProcessCallback ( Host::MonitorChildProcessCallback  callback)
inline

◆ SetProcessPluginName()

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

◆ 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 142 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_monitor_callback

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

◆ m_plugin_name

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

Definition at line 135 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 139 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 140 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 134 of file ProcessLaunchInfo.h.

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


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