LLDB mainline
lldb_private::DebuggerThread Class Reference

#include <DebuggerThread.h>

Inheritance diagram for lldb_private::DebuggerThread:
[legend]

Public Member Functions

 DebuggerThread (DebugDelegateSP debug_delegate)
virtual ~DebuggerThread ()
Status DebugLaunch (const ProcessLaunchInfo &launch_info)
Status DebugAttach (lldb::pid_t pid, const ProcessAttachInfo &attach_info)
HostProcess GetProcess () const
HostThread GetMainThread () const
std::weak_ptr< ExceptionRecordGetActiveException ()
Status StopDebugging (bool terminate)
void ContinueAsyncException (ExceptionResult result)
void ContinueAsyncDllEvent ()
 Release a HandleLoadDllEvent / HandleUnloadDllEvent that is parked on m_dll_event_pred.

Private Member Functions

void FreeProcessHandles ()
void DebugLoop ()
ExceptionResult HandleExceptionEvent (const EXCEPTION_DEBUG_INFO &info, DWORD thread_id, bool shutting_down)
DWORD HandleCreateThreadEvent (const CREATE_THREAD_DEBUG_INFO &info, DWORD thread_id)
DWORD HandleCreateProcessEvent (const CREATE_PROCESS_DEBUG_INFO &info, DWORD thread_id)
DWORD HandleExitThreadEvent (const EXIT_THREAD_DEBUG_INFO &info, DWORD thread_id)
DWORD HandleExitProcessEvent (const EXIT_PROCESS_DEBUG_INFO &info, DWORD thread_id)
DWORD HandleLoadDllEvent (const LOAD_DLL_DEBUG_INFO &info, DWORD thread_id)
DWORD HandleUnloadDllEvent (const UNLOAD_DLL_DEBUG_INFO &info, DWORD thread_id)
DWORD HandleODSEvent (const OUTPUT_DEBUG_STRING_INFO &info, DWORD thread_id)
DWORD HandleRipEvent (const RIP_INFO &info, DWORD thread_id)
lldb::thread_result_t DebuggerThreadLaunchRoutine (const ProcessLaunchInfo &launch_info)
lldb::thread_result_t DebuggerThreadAttachRoutine (lldb::pid_t pid, const ProcessAttachInfo &launch_info)

Private Attributes

DebugDelegateSP m_debug_delegate
HostProcess m_process
HostThread m_main_thread
HANDLE m_image_file = nullptr
ExceptionRecordSP m_active_exception
Predicate< ExceptionResultm_exception_pred
Predicate< boolm_dll_event_pred
HANDLE m_debugging_ended_event = nullptr
std::atomic< DWORD > m_pid_to_detach
std::atomic< boolm_is_shutting_down
bool m_detached = false

Detailed Description

Definition at line 27 of file DebuggerThread.h.

Constructor & Destructor Documentation

◆ DebuggerThread()

DebuggerThread::DebuggerThread ( DebugDelegateSP debug_delegate)

◆ ~DebuggerThread()

DebuggerThread::~DebuggerThread ( )
virtual

Definition at line 78 of file DebuggerThread.cpp.

References m_debugging_ended_event.

Member Function Documentation

◆ ContinueAsyncDllEvent()

void DebuggerThread::ContinueAsyncDllEvent ( )

Release a HandleLoadDllEvent / HandleUnloadDllEvent that is parked on m_dll_event_pred.

The delegate's Resume() path calls this to let the debug loop issue ContinueDebugEvent. Mirrors ContinueAsyncException.

Definition at line 254 of file DebuggerThread.cpp.

References lldb_private::eBroadcastAlways, and m_dll_event_pred.

Referenced by StopDebugging().

◆ ContinueAsyncException()

void DebuggerThread::ContinueAsyncException ( ExceptionResult result)

◆ DebugAttach()

◆ DebuggerThreadAttachRoutine()

lldb::thread_result_t DebuggerThread::DebuggerThreadAttachRoutine ( lldb::pid_t pid,
const ProcessAttachInfo & launch_info )
private

◆ DebuggerThreadLaunchRoutine()

◆ DebugLaunch()

◆ DebugLoop()

◆ FreeProcessHandles()

void DebuggerThread::FreeProcessHandles ( )
private

Definition at line 258 of file DebuggerThread.cpp.

References m_image_file, m_main_thread, and m_process.

Referenced by DebugLoop().

◆ GetActiveException()

std::weak_ptr< ExceptionRecord > lldb_private::DebuggerThread::GetActiveException ( )
inline

Definition at line 37 of file DebuggerThread.h.

References m_active_exception.

◆ GetMainThread()

HostThread lldb_private::DebuggerThread::GetMainThread ( ) const
inline

Definition at line 36 of file DebuggerThread.h.

References m_main_thread.

◆ GetProcess()

HostProcess lldb_private::DebuggerThread::GetProcess ( ) const
inline

Definition at line 35 of file DebuggerThread.h.

References m_process.

Referenced by StopDebugging().

◆ HandleCreateProcessEvent()

DWORD DebuggerThread::HandleCreateProcessEvent ( const CREATE_PROCESS_DEBUG_INFO & info,
DWORD thread_id )
private

◆ HandleCreateThreadEvent()

DWORD DebuggerThread::HandleCreateThreadEvent ( const CREATE_THREAD_DEBUG_INFO & info,
DWORD thread_id )
private

◆ HandleExceptionEvent()

ExceptionResult DebuggerThread::HandleExceptionEvent ( const EXCEPTION_DEBUG_INFO & info,
DWORD thread_id,
bool shutting_down )
private

◆ HandleExitProcessEvent()

DWORD DebuggerThread::HandleExitProcessEvent ( const EXIT_PROCESS_DEBUG_INFO & info,
DWORD thread_id )
private

◆ HandleExitThreadEvent()

DWORD DebuggerThread::HandleExitThreadEvent ( const EXIT_THREAD_DEBUG_INFO & info,
DWORD thread_id )
private

◆ HandleLoadDllEvent()

DWORD DebuggerThread::HandleLoadDllEvent ( const LOAD_DLL_DEBUG_INFO & info,
DWORD thread_id )
private

◆ HandleODSEvent()

DWORD DebuggerThread::HandleODSEvent ( const OUTPUT_DEBUG_STRING_INFO & info,
DWORD thread_id )
private

Definition at line 787 of file DebuggerThread.cpp.

References m_debug_delegate.

Referenced by DebugLoop().

◆ HandleRipEvent()

DWORD DebuggerThread::HandleRipEvent ( const RIP_INFO & info,
DWORD thread_id )
private

◆ HandleUnloadDllEvent()

DWORD DebuggerThread::HandleUnloadDllEvent ( const UNLOAD_DLL_DEBUG_INFO & info,
DWORD thread_id )
private

◆ StopDebugging()

Member Data Documentation

◆ m_active_exception

ExceptionRecordSP lldb_private::DebuggerThread::m_active_exception
private

◆ m_debug_delegate

◆ m_debugging_ended_event

HANDLE lldb_private::DebuggerThread::m_debugging_ended_event = nullptr
private

Definition at line 90 of file DebuggerThread.h.

Referenced by DebuggerThread(), DebugLoop(), StopDebugging(), and ~DebuggerThread().

◆ m_detached

bool lldb_private::DebuggerThread::m_detached = false
private

Definition at line 101 of file DebuggerThread.h.

Referenced by DebugLoop().

◆ m_dll_event_pred

Predicate<bool> lldb_private::DebuggerThread::m_dll_event_pred
private

◆ m_exception_pred

Predicate<ExceptionResult> lldb_private::DebuggerThread::m_exception_pred
private

Definition at line 82 of file DebuggerThread.h.

Referenced by ContinueAsyncException(), and HandleExceptionEvent().

◆ m_image_file

HANDLE lldb_private::DebuggerThread::m_image_file = nullptr
private

Definition at line 75 of file DebuggerThread.h.

Referenced by FreeProcessHandles(), and HandleCreateProcessEvent().

◆ m_is_shutting_down

std::atomic<bool> lldb_private::DebuggerThread::m_is_shutting_down
private

◆ m_main_thread

HostThread lldb_private::DebuggerThread::m_main_thread
private

Definition at line 72 of file DebuggerThread.h.

Referenced by FreeProcessHandles(), GetMainThread(), and HandleCreateProcessEvent().

◆ m_pid_to_detach

std::atomic<DWORD> lldb_private::DebuggerThread::m_pid_to_detach
private

Definition at line 93 of file DebuggerThread.h.

Referenced by DebuggerThread(), DebugLoop(), and StopDebugging().

◆ m_process


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