LLDB mainline
|
#include <DebuggerThread.h>
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< ExceptionRecord > | GetActiveException () |
Status | StopDebugging (bool terminate) |
void | ContinueAsyncException (ExceptionResult result) |
Private Member Functions | |
void | FreeProcessHandles () |
void | DebugLoop () |
ExceptionResult | HandleExceptionEvent (const EXCEPTION_DEBUG_INFO &info, DWORD thread_id) |
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< ExceptionResult > | m_exception_pred |
HANDLE | m_debugging_ended_event = nullptr |
std::atomic< DWORD > | m_pid_to_detach |
std::atomic< bool > | m_is_shutting_down |
bool | m_detached = false |
Definition at line 27 of file DebuggerThread.h.
DebuggerThread::DebuggerThread | ( | DebugDelegateSP | debug_delegate | ) |
Definition at line 43 of file DebuggerThread.cpp.
References m_debugging_ended_event.
|
virtual |
Definition at line 49 of file DebuggerThread.cpp.
References m_debugging_ended_event.
void DebuggerThread::ContinueAsyncException | ( | ExceptionResult | result | ) |
Definition at line 211 of file DebuggerThread.cpp.
References lldb_private::eBroadcastAlways, lldb_private::Exception, lldb_private::GetLog(), lldb_private::HostProcess::GetProcessId(), LLDB_LOG, m_active_exception, m_exception_pred, m_process, lldb_private::Process, and lldb_private::Predicate< T >::SetValue().
Referenced by StopDebugging().
Status DebuggerThread::DebugAttach | ( | lldb::pid_t | pid, |
const ProcessAttachInfo & | attach_info | ||
) |
Definition at line 67 of file DebuggerThread.cpp.
References DebuggerThreadAttachRoutine(), lldb_private::GetLog(), lldb_private::ThreadLauncher::LaunchThread(), LLDB_LOG, and lldb_private::Process.
|
private |
Definition at line 112 of file DebuggerThread.cpp.
References DebugLoop(), lldb::eErrorTypeWin32, error(), lldb_private::GetLog(), LLDB_LOG, m_debug_delegate, and lldb_private::Process.
Referenced by DebugAttach().
|
private |
Definition at line 85 of file DebuggerThread.cpp.
References DebugLoop(), error(), lldb_private::ProcessInfo::GetExecutableFile(), lldb_private::GetLog(), lldb_private::FileSpec::GetPath(), lldb_private::ProcessLauncherWindows::LaunchProcess(), LLDB_LOG, m_debug_delegate, and lldb_private::Process.
Referenced by DebugLaunch().
Status DebuggerThread::DebugLaunch | ( | const ProcessLaunchInfo & | launch_info | ) |
Definition at line 51 of file DebuggerThread.cpp.
References DebuggerThreadLaunchRoutine(), lldb_private::ProcessInfo::GetExecutableFile(), lldb_private::GetLog(), lldb_private::FileSpec::GetPath(), lldb_private::ThreadLauncher::LaunchThread(), LLDB_LOG, and lldb_private::Process.
|
private |
Definition at line 232 of file DebuggerThread.cpp.
References lldb_private::Event, FreeProcessHandles(), lldb_private::GetLog(), HandleCreateProcessEvent(), HandleCreateThreadEvent(), HandleExceptionEvent(), HandleExitProcessEvent(), HandleExitThreadEvent(), HandleLoadDllEvent(), HandleODSEvent(), HandleRipEvent(), HandleUnloadDllEvent(), LLDB_LOG, LLDB_LOGV, m_debugging_ended_event, and m_detached.
Referenced by DebuggerThreadAttachRoutine(), and DebuggerThreadLaunchRoutine().
|
private |
Definition at line 223 of file DebuggerThread.cpp.
References m_image_file, m_main_thread, and m_process.
Referenced by DebugLoop().
|
inline |
Definition at line 37 of file DebuggerThread.h.
References m_active_exception.
|
inline |
Definition at line 36 of file DebuggerThread.h.
References m_main_thread.
|
inline |
Definition at line 35 of file DebuggerThread.h.
References m_process.
Referenced by StopDebugging().
|
private |
Definition at line 367 of file DebuggerThread.cpp.
References lldb_private::Event, lldb_private::GetLog(), lldb_private::HostProcess::GetNativeProcess(), lldb_private::HostThread::GetNativeThread(), LLDB_LOG, m_debug_delegate, m_image_file, m_main_thread, m_process, and lldb_private::Process.
Referenced by DebugLoop().
|
private |
Definition at line 355 of file DebuggerThread.cpp.
References lldb_private::Event, lldb_private::GetLog(), lldb_private::HostThread::GetNativeThread(), lldb_private::HostProcess::GetProcessId(), LLDB_LOG, m_debug_delegate, m_process, and lldb_private::Thread.
Referenced by DebugLoop().
|
private |
Definition at line 312 of file DebuggerThread.cpp.
References lldb_private::eBroadcastNever, lldb_private::Event, lldb_private::Exception, lldb_private::GetLog(), lldb_private::Predicate< T >::GetValue(), LLDB_LOG, m_active_exception, m_debug_delegate, m_detached, m_exception_pred, m_is_shutting_down, m_pid_to_detach, lldb_private::Predicate< T >::SetValue(), STATUS_WX86_BREAKPOINT, and lldb_private::Predicate< T >::WaitForValueNotEqualTo().
Referenced by DebugLoop().
|
private |
Definition at line 405 of file DebuggerThread.cpp.
References lldb_private::Event, lldb_private::GetLog(), lldb_private::HostProcess::GetProcessId(), LLDB_LOG, m_debug_delegate, m_process, and lldb_private::Thread.
Referenced by DebugLoop().
|
private |
Definition at line 395 of file DebuggerThread.cpp.
References lldb_private::Event, lldb_private::GetLog(), lldb_private::HostProcess::GetProcessId(), LLDB_LOG, m_debug_delegate, m_process, and lldb_private::Thread.
Referenced by DebugLoop().
|
private |
Definition at line 472 of file DebuggerThread.cpp.
References lldb_private::Event, GetFileNameFromHandleFallback(), lldb_private::GetLog(), lldb_private::HostProcess::GetProcessId(), LLDB_LOG, m_debug_delegate, and m_process.
Referenced by DebugLoop().
|
private |
Definition at line 535 of file DebuggerThread.cpp.
Referenced by DebugLoop().
|
private |
Definition at line 541 of file DebuggerThread.cpp.
References lldb::eErrorTypeWin32, error(), lldb_private::Event, lldb_private::GetLog(), lldb_private::HostProcess::GetProcessId(), LLDB_LOG, m_debug_delegate, and m_process.
Referenced by DebugLoop().
|
private |
Definition at line 523 of file DebuggerThread.cpp.
References lldb_private::Event, lldb_private::GetLog(), lldb_private::HostProcess::GetProcessId(), LLDB_LOG, m_debug_delegate, and m_process.
Referenced by DebugLoop().
Status DebuggerThread::StopDebugging | ( | bool | terminate | ) |
Definition at line 136 of file DebuggerThread.cpp.
References ContinueAsyncException(), lldb::eErrorTypeWin32, error(), lldb_private::GetLog(), lldb_private::HostProcess::GetNativeProcess(), GetProcess(), lldb_private::HostProcess::GetProcessId(), lldb_private::HostNativeProcessBase::GetSystemHandle(), LLDB_INVALID_PROCESS, LLDB_LOG, m_active_exception, m_debugging_ended_event, m_is_shutting_down, m_pid_to_detach, m_process, and lldb_private::Process.
|
private |
Definition at line 73 of file DebuggerThread.h.
Referenced by ContinueAsyncException(), GetActiveException(), HandleExceptionEvent(), and StopDebugging().
|
private |
Definition at line 64 of file DebuggerThread.h.
Referenced by DebuggerThreadAttachRoutine(), DebuggerThreadLaunchRoutine(), HandleCreateProcessEvent(), HandleCreateThreadEvent(), HandleExceptionEvent(), HandleExitProcessEvent(), HandleExitThreadEvent(), HandleLoadDllEvent(), HandleRipEvent(), and HandleUnloadDllEvent().
|
private |
Definition at line 81 of file DebuggerThread.h.
Referenced by DebuggerThread(), DebugLoop(), StopDebugging(), and ~DebuggerThread().
|
private |
Definition at line 92 of file DebuggerThread.h.
Referenced by DebugLoop(), and HandleExceptionEvent().
|
private |
Definition at line 77 of file DebuggerThread.h.
Referenced by ContinueAsyncException(), and HandleExceptionEvent().
|
private |
Definition at line 70 of file DebuggerThread.h.
Referenced by FreeProcessHandles(), and HandleCreateProcessEvent().
|
private |
Definition at line 88 of file DebuggerThread.h.
Referenced by HandleExceptionEvent(), and StopDebugging().
|
private |
Definition at line 67 of file DebuggerThread.h.
Referenced by FreeProcessHandles(), GetMainThread(), and HandleCreateProcessEvent().
|
private |
Definition at line 84 of file DebuggerThread.h.
Referenced by HandleExceptionEvent(), and StopDebugging().
|
private |
Definition at line 66 of file DebuggerThread.h.
Referenced by ContinueAsyncException(), FreeProcessHandles(), GetProcess(), HandleCreateProcessEvent(), HandleCreateThreadEvent(), HandleExitProcessEvent(), HandleExitThreadEvent(), HandleLoadDllEvent(), HandleRipEvent(), HandleUnloadDllEvent(), and StopDebugging().