LLDB mainline
|
#include <NativeProcessLinux.h>
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 | |
Manager & | operator= (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 | |
MainLoop & | m_mainloop |
Definition at line 44 of file NativeProcessLinux.h.
NativeProcessLinux::Manager::Manager | ( | MainLoop & | mainloop | ) |
Definition at line 255 of file NativeProcessLinux.cpp.
References m_sigchld_handle, lldb_private::MainLoopPosix::RegisterSignal(), SigchldHandler(), and lldb_private::Status::Success().
|
inline |
Definition at line 57 of file NativeProcessLinux.h.
References m_processes.
Referenced by lldb_private::process_linux::NativeProcessLinux::NativeProcessLinux().
|
overridevirtual |
Attach to an existing process.
[in] | pid | pid of the process locatable |
[in] | native_delegate | The delegate that will receive messages regarding the inferior. Must outlive the NativeProcessProtocol instance. |
[in] | mainloop | The mainloop instance with which the process can register callbacks. Must outlive the NativeProcessProtocol instance. |
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.
void NativeProcessLinux::Manager::CollectThread | ( | ::pid_t | tid | ) |
Definition at line 399 of file NativeProcessLinux.cpp.
References lldb_private::WaitStatus::Decode(), lldb_private::GetLog(), LLDB_LOG, and lldb_private::Process.
Referenced by lldb_private::process_linux::NativeProcessLinux::MonitorClone().
|
overridevirtual |
Get the bitmask of extensions supported by this process plugin.
Reimplemented from lldb_private::NativeProcessProtocol::Manager.
Definition at line 329 of file NativeProcessLinux.cpp.
References lldb_private::NativeProcessProtocol::auxv, lldb_private::NativeProcessProtocol::fork, HWCAP2_MTE, lldb_private::NativeProcessProtocol::libraries_svr4, lldb_private::NativeProcessProtocol::memory_tagging, lldb_private::NativeProcessProtocol::multiprocess, lldb_private::NativeProcessProtocol::pass_signals, lldb_private::NativeProcessProtocol::siginfo_read, and lldb_private::NativeProcessProtocol::vfork.
|
overridevirtual |
Launch a process for debugging.
[in] | launch_info | Information required to launch the process. |
[in] | native_delegate | The delegate that will receive messages regarding the inferior. Must outlive the NativeProcessProtocol instance. |
[in] | mainloop | The mainloop instance with which the process can register callbacks. Must outlive the NativeProcessProtocol instance. |
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.
|
inline |
Definition at line 61 of file NativeProcessLinux.h.
References m_processes.
Referenced by lldb_private::process_linux::NativeProcessLinux::~NativeProcessLinux().
|
private |
Definition at line 367 of file NativeProcessLinux.cpp.
References lldb_private::GetLog(), LLDB_LOG, lldb_private::Process, SIGSTOP, lldb_private::WaitStatus::status, lldb_private::WaitStatus::Stop, lldb_private::process_linux::NativeProcessLinux::TryHandleWaitStatus(), lldb_private::WaitStatus::type, and WaitPid().
Referenced by Manager().
|
private |
Definition at line 71 of file NativeProcessLinux.h.
Referenced by AddProcess(), and RemoveProcess().
|
private |
Definition at line 69 of file NativeProcessLinux.h.
Referenced by Manager().
|
private |
Definition at line 74 of file NativeProcessLinux.h.