LLDB mainline
lldb_private::ProcessLaunchInfo Class Reference

#include <ProcessLaunchInfo.h>

Inheritance diagram for lldb_private::ProcessLaunchInfo:
[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() [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()

◆ Clear()

◆ ConvertArgumentsForLaunchingInShell()

◆ GetDetachOnError()

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

Definition at line 129 of file ProcessLaunchInfo.h.

References m_flags.

Referenced by lldb_private::ProcessAttachInfo::ProcessAttachInfo().

◆ GetFileActionAtIndex()

◆ GetFileActionForFD()

◆ GetFlags() [1/2]

◆ 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()

◆ GetResumeCount()

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

◆ GetShell()

◆ GetShellExpandArguments()

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

Definition at line 89 of file ProcessLaunchInfo.h.

References m_flags.

◆ GetWorkingDirectory()

◆ MonitorProcess()

◆ 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)

Definition at line 192 of file ProcessLaunchInfo.cpp.

References m_flags.

◆ SetLaunchEventData()

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

Definition at line 123 of file ProcessLaunchInfo.h.

References m_event_data.

◆ SetLaunchInSeparateProcessGroup()

◆ SetMonitorProcessCallback()

◆ SetProcessPluginName()

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

Definition at line 133 of file ProcessLaunchInfo.cpp.

References m_plugin_name.

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

◆ 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)

Definition at line 155 of file ProcessLaunchInfo.cpp.

References m_flags.

◆ SetUpPtyRedirection()

◆ SetWorkingDirectory()

void ProcessLaunchInfo::SetWorkingDirectory ( const FileSpec & working_dir)

Definition at line 125 of file ProcessLaunchInfo.cpp.

References m_working_dir.

Referenced by ProcessLaunchInfo(), and lldb_private::Host::RunShellCommand().

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

◆ m_monitor_callback

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

◆ m_plugin_name

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

◆ m_pty

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

◆ 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

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