LLDB mainline
|
#include <MainLoopPosix.h>
Classes | |
class | RunImpl |
class | SignalHandle |
struct | SignalInfo |
Public Types | |
typedef std::unique_ptr< SignalHandle > | SignalHandleUP |
Public Types inherited from lldb_private::MainLoopBase | |
typedef std::unique_ptr< ReadHandle > | ReadHandleUP |
typedef std::function< void(MainLoopBase &)> | Callback |
Public Member Functions | |
MainLoopPosix () | |
~MainLoopPosix () override | |
ReadHandleUP | RegisterReadObject (const lldb::IOObjectSP &object_sp, const Callback &callback, Status &error) override |
SignalHandleUP | RegisterSignal (int signo, const Callback &callback, Status &error) |
Status | Run () override |
Public Member Functions inherited from lldb_private::MainLoopBase | |
MainLoopBase () | |
virtual | ~MainLoopBase ()=default |
virtual ReadHandleUP | RegisterReadObject (const lldb::IOObjectSP &object_sp, const Callback &callback, Status &error)=0 |
void | AddPendingCallback (const Callback &callback) |
virtual Status | Run () |
virtual void | RequestTermination () |
Protected Member Functions | |
void | UnregisterReadObject (IOObject::WaitableHandle handle) override |
void | UnregisterSignal (int signo, std::list< Callback >::iterator callback_it) |
void | TriggerPendingCallbacks () override |
Protected Member Functions inherited from lldb_private::MainLoopBase | |
ReadHandleUP | CreateReadHandle (const lldb::IOObjectSP &object_sp) |
virtual void | UnregisterReadObject (IOObject::WaitableHandle handle)=0 |
virtual void | TriggerPendingCallbacks ()=0 |
void | ProcessPendingCallbacks () |
Private Member Functions | |
void | ProcessReadObject (IOObject::WaitableHandle handle) |
void | ProcessSignal (int signo) |
Private Attributes | |
llvm::DenseMap< IOObject::WaitableHandle, Callback > | m_read_fds |
llvm::DenseMap< int, SignalInfo > | m_signals |
Pipe | m_trigger_pipe |
std::atomic< bool > | m_triggering |
Additional Inherited Members | |
Protected Attributes inherited from lldb_private::MainLoopBase | |
std::mutex | m_callback_mutex |
std::vector< Callback > | m_pending_callbacks |
bool | m_terminate_request: 1 |
Definition at line 27 of file MainLoopPosix.h.
typedef std::unique_ptr<SignalHandle> lldb_private::MainLoopPosix::SignalHandleUP |
Definition at line 32 of file MainLoopPosix.h.
MainLoopPosix::MainLoopPosix | ( | ) |
Definition at line 228 of file MainLoopPosix.cpp.
References lldb_private::PipePosix::CreateNew(), error(), lldb_private::PipePosix::GetReadFileDescriptor(), m_read_fds, m_trigger_pipe, and UNUSED_IF_ASSERT_DISABLED.
|
override |
Definition at line 247 of file MainLoopPosix.cpp.
References lldb_private::PipePosix::Close(), lldb_private::PipePosix::GetReadFileDescriptor(), m_read_fds, m_signals, and m_trigger_pipe.
|
private |
Definition at line 383 of file MainLoopPosix.cpp.
References m_read_fds.
Referenced by lldb_private::MainLoopPosix::RunImpl::ProcessEvents().
|
private |
Definition at line 389 of file MainLoopPosix.cpp.
References m_signals.
Referenced by lldb_private::MainLoopPosix::RunImpl::ProcessEvents().
|
overridevirtual |
Implements lldb_private::MainLoopBase.
Definition at line 258 of file MainLoopPosix.cpp.
References lldb_private::MainLoopBase::CreateReadHandle(), error(), and m_read_fds.
Referenced by lldb_private::TCPSocket::Accept(), lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::InitializeConnection(), and lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::StartSTDIOForwarding().
MainLoopPosix::SignalHandleUP MainLoopPosix::RegisterSignal | ( | int | signo, |
const Callback & | callback, | ||
Status & | error | ||
) |
Definition at line 279 of file MainLoopPosix.cpp.
References lldb_private::MainLoopPosix::SignalInfo::callbacks, g_signal_flags, m_signals, lldb_private::MainLoopPosix::SignalInfo::old_action, SignalHandler(), UNUSED_IF_ASSERT_DISABLED, and lldb_private::MainLoopPosix::SignalInfo::was_blocked.
Referenced by lldb_private::process_linux::NativeProcessLinux::Manager::Manager(), lldb_private::process_freebsd::NativeProcessFreeBSD::NativeProcessFreeBSD(), and lldb_private::process_netbsd::NativeProcessNetBSD::NativeProcessNetBSD().
|
overridevirtual |
Reimplemented from lldb_private::MainLoopBase.
Definition at line 361 of file MainLoopPosix.cpp.
References error(), m_read_fds, m_signals, lldb_private::MainLoopBase::m_terminate_request, m_triggering, lldb_private::MainLoopPosix::RunImpl::Poll(), lldb_private::MainLoopPosix::RunImpl::ProcessEvents(), and lldb_private::MainLoopBase::ProcessPendingCallbacks().
Referenced by lldb_private::TCPSocket::Accept().
|
overrideprotectedvirtual |
Implements lldb_private::MainLoopBase.
Definition at line 401 of file MainLoopPosix.cpp.
References error(), m_trigger_pipe, m_triggering, UNUSED_IF_ASSERT_DISABLED, and lldb_private::PipeBase::Write().
|
overrideprotectedvirtual |
Implements lldb_private::MainLoopBase.
Definition at line 325 of file MainLoopPosix.cpp.
References m_read_fds, and UNUSED_IF_ASSERT_DISABLED.
|
protected |
Definition at line 331 of file MainLoopPosix.cpp.
References m_signals, and UNUSED_IF_ASSERT_DISABLED.
Referenced by lldb_private::MainLoopPosix::SignalHandle::~SignalHandle().
|
private |
Definition at line 88 of file MainLoopPosix.h.
Referenced by MainLoopPosix(), lldb_private::MainLoopPosix::RunImpl::Poll(), lldb_private::MainLoopPosix::RunImpl::ProcessEvents(), ProcessReadObject(), RegisterReadObject(), Run(), lldb_private::MainLoopPosix::RunImpl::RunImpl(), UnregisterReadObject(), and ~MainLoopPosix().
|
private |
Definition at line 89 of file MainLoopPosix.h.
Referenced by lldb_private::MainLoopPosix::RunImpl::get_sigmask(), lldb_private::MainLoopPosix::RunImpl::ProcessEvents(), ProcessSignal(), RegisterSignal(), Run(), UnregisterSignal(), and ~MainLoopPosix().
|
private |
Definition at line 90 of file MainLoopPosix.h.
Referenced by MainLoopPosix(), TriggerPendingCallbacks(), and ~MainLoopPosix().
|
private |
Definition at line 91 of file MainLoopPosix.h.
Referenced by Run(), and TriggerPendingCallbacks().