LLDB mainline
Public Member Functions | Private Member Functions | Private Attributes | List of all members
lldb_private::process_linux::NativeProcessLinux::Manager Class Reference

#include <NativeProcessLinux.h>

Inheritance diagram for lldb_private::process_linux::NativeProcessLinux::Manager:
Inheritance graph
[legend]

Public Member Functions

 Manager (MainLoop &mainloop)
 
llvm::Expected< std::unique_ptr< NativeProcessProtocol > > Launch (ProcessLaunchInfo &launch_info, NativeDelegate &native_delegate) override
 Launch a process for debugging.
 
llvm::Expected< std::unique_ptr< NativeProcessProtocol > > Attach (lldb::pid_t pid, NativeDelegate &native_delegate) override
 Attach to an existing process.
 
Extension GetSupportedExtensions () const override
 Get the bitmask of extensions supported by this process plugin.
 
void AddProcess (NativeProcessLinux &process)
 
void RemoveProcess (NativeProcessLinux &process)
 
void CollectThread (::pid_t tid)
 
- Public Member Functions inherited from lldb_private::NativeProcessProtocol::Manager
 Manager (MainLoop &mainloop)
 
 Manager (const Manager &)=delete
 
Manageroperator= (const Manager &)=delete
 
virtual ~Manager ()
 
virtual llvm::Expected< std::unique_ptr< NativeProcessProtocol > > Launch (ProcessLaunchInfo &launch_info, NativeDelegate &native_delegate)=0
 Launch a process for debugging.
 
virtual llvm::Expected< std::unique_ptr< NativeProcessProtocol > > Attach (lldb::pid_t pid, NativeDelegate &native_delegate)=0
 Attach to an existing process.
 
virtual Extension GetSupportedExtensions () const
 Get the bitmask of extensions supported by this process plugin.
 

Private Member Functions

void SigchldHandler ()
 

Private Attributes

MainLoop::SignalHandleUP m_sigchld_handle
 
llvm::SmallPtrSet< NativeProcessLinux *, 2 > m_processes
 
llvm::DenseSet<::pid_t > m_unowned_threads
 

Additional Inherited Members

- Protected Attributes inherited from lldb_private::NativeProcessProtocol::Manager
MainLoopm_mainloop
 

Detailed Description

Definition at line 44 of file NativeProcessLinux.h.

Constructor & Destructor Documentation

◆ Manager()

NativeProcessLinux::Manager::Manager ( MainLoop mainloop)

Member Function Documentation

◆ AddProcess()

void lldb_private::process_linux::NativeProcessLinux::Manager::AddProcess ( NativeProcessLinux process)
inline

◆ Attach()

llvm::Expected< std::unique_ptr< NativeProcessProtocol > > NativeProcessLinux::Manager::Attach ( lldb::pid_t  pid,
NativeDelegate native_delegate 
)
overridevirtual

Attach to an existing process.

Parameters
[in]pidpid of the process locatable
[in]native_delegateThe delegate that will receive messages regarding the inferior. Must outlive the NativeProcessProtocol instance.
[in]mainloopThe mainloop instance with which the process can register callbacks. Must outlive the NativeProcessProtocol instance.
Returns
A NativeProcessProtocol shared pointer if the operation succeeded or an error object if it failed.

Implements lldb_private::NativeProcessProtocol::Manager.

Definition at line 310 of file NativeProcessLinux.cpp.

References lldb_private::process_linux::NativeProcessLinux::Attach(), lldb_private::process_linux::NativeRegisterContextLinux::DetermineArchitecture(), lldb_private::GetLog(), LLDB_LOG, and lldb_private::Process.

◆ CollectThread()

void NativeProcessLinux::Manager::CollectThread ( ::pid_t  tid)

◆ GetSupportedExtensions()

NativeProcessLinux::Extension NativeProcessLinux::Manager::GetSupportedExtensions ( ) const
overridevirtual

◆ Launch()

llvm::Expected< std::unique_ptr< NativeProcessProtocol > > NativeProcessLinux::Manager::Launch ( ProcessLaunchInfo launch_info,
NativeDelegate native_delegate 
)
overridevirtual

Launch a process for debugging.

Parameters
[in]launch_infoInformation required to launch the process.
[in]native_delegateThe delegate that will receive messages regarding the inferior. Must outlive the NativeProcessProtocol instance.
[in]mainloopThe mainloop instance with which the process can register callbacks. Must outlive the NativeProcessProtocol instance.
Returns
A NativeProcessProtocol shared pointer if the operation succeeded or an error object if it failed.

Implements lldb_private::NativeProcessProtocol::Manager.

Definition at line 264 of file NativeProcessLinux.cpp.

References lldb_private::WaitStatus::Decode(), lldb_private::process_linux::NativeRegisterContextLinux::DetermineArchitecture(), lldb_private::Status::Fail(), lldb_private::GetLog(), lldb_private::HostProcess::GetProcessId(), lldb_private::ProcessLaunchInfo::GetPTY(), lldb_private::ProcessLauncherPosixFork::LaunchProcess(), LLDB_LOG, MaybeLogLaunchInfo(), lldb_private::Process, lldb_private::PseudoTerminal::ReleasePrimaryFileDescriptor(), lldb_private::process_linux::NativeProcessLinux::SetDefaultPtraceOpts(), lldb_private::Status::ToError(), and UNUSED_IF_ASSERT_DISABLED.

◆ RemoveProcess()

void lldb_private::process_linux::NativeProcessLinux::Manager::RemoveProcess ( NativeProcessLinux process)
inline

◆ SigchldHandler()

void NativeProcessLinux::Manager::SigchldHandler ( )
private

Member Data Documentation

◆ m_processes

llvm::SmallPtrSet<NativeProcessLinux *, 2> lldb_private::process_linux::NativeProcessLinux::Manager::m_processes
private

Definition at line 71 of file NativeProcessLinux.h.

Referenced by AddProcess(), and RemoveProcess().

◆ m_sigchld_handle

MainLoop::SignalHandleUP lldb_private::process_linux::NativeProcessLinux::Manager::m_sigchld_handle
private

Definition at line 69 of file NativeProcessLinux.h.

Referenced by Manager().

◆ m_unowned_threads

llvm::DenseSet<::pid_t> lldb_private::process_linux::NativeProcessLinux::Manager::m_unowned_threads
private

Definition at line 74 of file NativeProcessLinux.h.


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