|
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 () |
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 45 of file NativeProcessLinux.h.
| NativeProcessLinux::Manager::Manager | ( | MainLoop & | mainloop | ) |
Definition at line 257 of file NativeProcessLinux.cpp.
References m_sigchld_handle, Manager(), lldb_private::NativeProcessELF::NativeProcessProtocol(), lldb_private::MainLoopPosix::RegisterSignal(), SigchldHandler(), and lldb_private::Status::Success().
Referenced by Manager().
|
inline |
Definition at line 58 of file NativeProcessLinux.h.
References m_processes, and lldb_private::process_linux::NativeProcessLinux::NativeProcessLinux().
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 312 of file NativeProcessLinux.cpp.
References lldb_private::process_linux::NativeProcessLinux::Attach(), lldb_private::process_linux::NativeRegisterContextLinux::DetermineArchitecture(), lldb_private::GetLog(), LLDB_LOG, lldb_private::process_linux::NativeProcessLinux::NativeProcessLinux(), and lldb_private::Process.
| void NativeProcessLinux::Manager::CollectThread | ( | ::pid_t | tid | ) |
Definition at line 401 of file NativeProcessLinux.cpp.
References lldb_private::WaitStatus::Decode(), lldb_private::GetLog(), LLDB_LOG, m_unowned_threads, and lldb_private::Process.
|
overridevirtual |
Get the bitmask of extensions supported by this process plugin.
Reimplemented from lldb_private::NativeProcessProtocol::Manager.
Definition at line 331 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 266 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_linux::NativeProcessLinux::NativeProcessLinux(), 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 62 of file NativeProcessLinux.h.
References m_processes, and lldb_private::process_linux::NativeProcessLinux::NativeProcessLinux().
|
private |
Definition at line 369 of file NativeProcessLinux.cpp.
References lldb_private::GetLog(), LLDB_LOG, m_processes, m_unowned_threads, lldb_private::process_linux::NativeProcessLinux::NativeProcessLinux(), 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 72 of file NativeProcessLinux.h.
Referenced by AddProcess(), RemoveProcess(), and SigchldHandler().
|
private |
Definition at line 70 of file NativeProcessLinux.h.
Referenced by Manager().
|
private |
Definition at line 75 of file NativeProcessLinux.h.
Referenced by CollectThread(), and SigchldHandler().