LLDB mainline
|
#include <ProcessDebugger.h>
Public Member Functions | |
virtual | ~ProcessDebugger () |
virtual void | OnExitProcess (uint32_t exit_code) |
virtual void | OnDebuggerConnected (lldb::addr_t image_base) |
virtual ExceptionResult | OnDebugException (bool first_chance, const ExceptionRecord &record) |
virtual void | OnCreateThread (const HostThread &thread) |
virtual void | OnExitThread (lldb::tid_t thread_id, uint32_t exit_code) |
virtual void | OnLoadDll (const ModuleSpec &module_spec, lldb::addr_t module_addr) |
virtual void | OnUnloadDll (lldb::addr_t module_addr) |
virtual void | OnDebugString (const std::string &string) |
virtual void | OnDebuggerError (const Status &error, uint32_t type) |
Protected Member Functions | |
Status | DetachProcess () |
Status | LaunchProcess (ProcessLaunchInfo &launch_info, DebugDelegateSP delegate) |
Status | AttachProcess (lldb::pid_t pid, const ProcessAttachInfo &attach_info, DebugDelegateSP delegate) |
Status | DestroyProcess (lldb::StateType process_state) |
Status | HaltProcess (bool &caused_stop) |
Status | GetMemoryRegionInfo (lldb::addr_t load_addr, MemoryRegionInfo &range_info) |
Status | ReadMemory (lldb::addr_t addr, void *buf, size_t size, size_t &bytes_read) |
Status | WriteMemory (lldb::addr_t addr, const void *buf, size_t size, size_t &bytes_written) |
Status | AllocateMemory (size_t size, uint32_t permissions, lldb::addr_t &addr) |
Status | DeallocateMemory (lldb::addr_t addr) |
lldb::pid_t | GetDebuggedProcessId () const |
Status | WaitForDebuggerConnection (DebuggerThreadSP debugger, HostProcess &process) |
Protected Attributes | |
llvm::sys::Mutex | m_mutex |
std::unique_ptr< ProcessWindowsData > | m_session_data |
Definition at line 48 of file ProcessDebugger.h.
|
virtual |
Definition at line 66 of file ProcessDebugger.cpp.
|
protected |
Definition at line 322 of file ProcessDebugger.cpp.
References ConvertLldbToWinApiProtect(), lldb::eErrorTypeWin32, error(), lldb_private::GetLog(), lldb_private::HostProcess::GetNativeProcess(), lldb_private::HostNativeProcessBase::GetSystemHandle(), LLDB_INVALID_ADDRESS, LLDB_LOG, m_mutex, m_session_data, and lldb_private::Memory.
Referenced by lldb_private::NativeProcessWindows::AllocateMemory(), and lldb_private::ProcessWindows::DoAllocateMemory().
|
protected |
Definition at line 171 of file ProcessDebugger.cpp.
References error(), lldb_private::ProcessAttachInfo::GetContinueOnceAttached(), lldb_private::GetLog(), LLDB_LOG, m_session_data, lldb_private::Process, and WaitForDebuggerConnection().
Referenced by lldb_private::ProcessWindows::DoAttachToProcessWithID(), and lldb_private::NativeProcessWindows::NativeProcessWindows().
|
protected |
Definition at line 351 of file ProcessDebugger.cpp.
References lldb::eErrorTypeWin32, lldb_private::GetLog(), lldb_private::HostProcess::GetNativeProcess(), lldb_private::HostNativeProcessBase::GetSystemHandle(), LLDB_LOG, m_mutex, m_session_data, lldb_private::Memory, lldb_private::Status::SetError(), and lldb_private::Status::SetErrorString().
Referenced by lldb_private::NativeProcessWindows::DeallocateMemory(), and lldb_private::ProcessWindows::DoDeallocateMemory().
|
protected |
Definition at line 211 of file ProcessDebugger.cpp.
References error(), lldb::eStateDetached, lldb::eStateExited, GetDebuggedProcessId(), lldb_private::GetLog(), LLDB_LOG, m_mutex, m_session_data, and lldb_private::Process.
Referenced by lldb_private::ProcessWindows::DoDestroy(), and lldb_private::NativeProcessWindows::Kill().
|
protected |
Definition at line 74 of file ProcessDebugger.cpp.
References error(), lldb_private::GetLog(), LLDB_LOG, m_mutex, m_session_data, and lldb_private::Process.
Referenced by lldb_private::NativeProcessWindows::Detach(), and lldb_private::ProcessWindows::DoDetach().
|
protected |
Definition at line 68 of file ProcessDebugger.cpp.
References LLDB_INVALID_PROCESS_ID, and m_session_data.
Referenced by DestroyProcess(), lldb_private::ProcessWindows::DoAttachToProcessWithID(), lldb_private::NativeProcessWindows::NativeProcessWindows(), lldb_private::NativeProcessWindows::OnDebuggerConnected(), and lldb_private::NativeProcessWindows::Resume().
|
protected |
Definition at line 376 of file ProcessDebugger.cpp.
References lldb_private::MemoryRegionInfo::Clear(), lldb::eErrorTypeWin32, lldb_private::MemoryRegionInfo::eNo, error(), lldb_private::MemoryRegionInfo::eYes, lldb_private::MemoryRegionInfo::GetExecutable(), lldb_private::GetLog(), lldb_private::HostProcess::GetNativeProcess(), lldb_private::MemoryRegionInfo::GetRange(), lldb_private::MemoryRegionInfo::GetReadable(), lldb_private::HostNativeProcessBase::GetSystemHandle(), lldb_private::MemoryRegionInfo::GetWritable(), IsPageExecutable(), IsPageReadable(), IsPageWritable(), LLDB_INVALID_ADDRESS, LLDB_INVALID_PROCESS, LLDB_LOG, LLDB_LOGV, m_mutex, m_session_data, lldb_private::Memory, lldb_private::Range< B, S >::SetByteSize(), lldb_private::MemoryRegionInfo::SetExecutable(), lldb_private::MemoryRegionInfo::SetMapped(), lldb_private::Range< B, S >::SetRangeBase(), lldb_private::Range< B, S >::SetRangeEnd(), lldb_private::MemoryRegionInfo::SetReadable(), and lldb_private::MemoryRegionInfo::SetWritable().
Referenced by lldb_private::ProcessWindows::DoGetMemoryRegionInfo(), and lldb_private::NativeProcessWindows::GetMemoryRegionInfo().
|
protected |
Definition at line 247 of file ProcessDebugger.cpp.
References lldb::eErrorTypeWin32, error(), lldb_private::GetLog(), LLDB_LOG, m_mutex, m_session_data, and lldb_private::Process.
Referenced by lldb_private::ProcessWindows::DoHalt(), and lldb_private::NativeProcessWindows::Halt().
|
protected |
Definition at line 105 of file ProcessDebugger.cpp.
References error(), lldb_private::Status::Fail(), lldb_private::ProcessInfo::GetExecutableFile(), lldb_private::ProcessLaunchInfo::GetFlags(), lldb_private::GetLog(), lldb_private::FileSpec::GetPath(), lldb_private::HostProcess::GetProcessId(), lldb_private::StreamString::GetString(), lldb_private::ProcessLaunchInfo::GetWorkingDirectory(), lldb_private::FileSystem::Instance(), LLDB_LOG, m_session_data, lldb_private::Stream::Printf(), lldb_private::Process, lldb_private::FileSystem::Resolve(), lldb_private::Status::SetErrorString(), lldb_private::Status::SetErrorStringWithFormat(), lldb_private::ProcessInfo::SetProcessID(), lldb_private::Flags::Test(), and WaitForDebuggerConnection().
Referenced by lldb_private::ProcessWindows::DoLaunch(), and lldb_private::NativeProcessWindows::NativeProcessWindows().
|
virtual |
Reimplemented in lldb_private::NativeProcessWindows, and lldb_private::ProcessWindows.
Definition at line 516 of file ProcessDebugger.cpp.
|
virtual |
Reimplemented in lldb_private::NativeProcessWindows, and lldb_private::ProcessWindows.
Definition at line 481 of file ProcessDebugger.cpp.
References lldb_private::Exception, lldb_private::ExceptionRecord::GetExceptionAddress(), lldb_private::ExceptionRecord::GetExceptionCode(), lldb_private::GetLog(), LLDB_LOG, m_mutex, and m_session_data.
Referenced by lldb_private::NativeProcessWindows::OnDebugException().
|
virtual |
Reimplemented in lldb_private::NativeProcessWindows, and lldb_private::ProcessWindows.
Definition at line 478 of file ProcessDebugger.cpp.
|
virtual |
Reimplemented in lldb_private::ProcessWindows.
Definition at line 535 of file ProcessDebugger.cpp.
References error(), lldb_private::GetLog(), LLDB_LOG, m_mutex, m_session_data, and lldb_private::Process.
Referenced by lldb_private::NativeDebugDelegate::OnDebuggerError(), and OnExitProcess().
|
virtual |
Reimplemented in lldb_private::ProcessWindows.
Definition at line 533 of file ProcessDebugger.cpp.
Referenced by lldb_private::NativeDebugDelegate::OnDebugString().
|
virtual |
Reimplemented in lldb_private::NativeProcessWindows, and lldb_private::ProcessWindows.
Definition at line 468 of file ProcessDebugger.cpp.
References lldb::eErrorTypeWin32, error(), m_session_data, and OnDebuggerError().
Referenced by lldb_private::NativeProcessWindows::OnExitProcess(), and lldb_private::ProcessWindows::OnExitProcess().
|
virtual |
Reimplemented in lldb_private::NativeProcessWindows, and lldb_private::ProcessWindows.
Definition at line 520 of file ProcessDebugger.cpp.
|
virtual |
Reimplemented in lldb_private::NativeProcessWindows, and lldb_private::ProcessWindows.
Definition at line 524 of file ProcessDebugger.cpp.
|
virtual |
Reimplemented in lldb_private::NativeProcessWindows, and lldb_private::ProcessWindows.
Definition at line 529 of file ProcessDebugger.cpp.
|
protected |
Definition at line 262 of file ProcessDebugger.cpp.
References lldb::eErrorTypeWin32, error(), lldb_private::GetLog(), lldb_private::HostProcess::GetNativeProcess(), lldb_private::HostNativeProcessBase::GetSystemHandle(), LLDB_LOG, m_mutex, m_session_data, lldb_private::Memory, and ReadProcessMemory().
Referenced by lldb_private::ProcessWindows::DoReadMemory(), and lldb_private::NativeProcessWindows::ReadMemory().
|
protected |
Definition at line 560 of file ProcessDebugger.cpp.
References lldb_private::Breakpoints, lldb::eErrorTypeWin32, lldb_private::GetLog(), LLDB_LOG, m_session_data, and lldb_private::Process.
Referenced by AttachProcess(), and LaunchProcess().
|
protected |
Definition at line 292 of file ProcessDebugger.cpp.
References lldb::eErrorTypeWin32, error(), lldb_private::GetLog(), lldb_private::HostProcess::GetNativeProcess(), lldb_private::HostNativeProcessBase::GetSystemHandle(), LLDB_LOG, m_mutex, m_session_data, and lldb_private::Memory.
Referenced by lldb_private::ProcessWindows::DoWriteMemory(), and lldb_private::NativeProcessWindows::WriteMemory().
|
protected |
Definition at line 97 of file ProcessDebugger.h.
Referenced by AllocateMemory(), DeallocateMemory(), DestroyProcess(), DetachProcess(), lldb_private::ProcessWindows::DidAttach(), lldb_private::ProcessWindows::DoResume(), GetMemoryRegionInfo(), HaltProcess(), lldb_private::NativeProcessWindows::OnCreateThread(), lldb_private::ProcessWindows::OnCreateThread(), OnDebugException(), lldb_private::NativeProcessWindows::OnDebugException(), lldb_private::ProcessWindows::OnDebugException(), lldb_private::ProcessWindows::OnDebuggerConnected(), OnDebuggerError(), lldb_private::ProcessWindows::OnDebuggerError(), lldb_private::NativeProcessWindows::OnExitThread(), lldb_private::ProcessWindows::OnExitThread(), ReadMemory(), lldb_private::ProcessWindows::RefreshStateAfterStop(), lldb_private::NativeProcessWindows::Resume(), and WriteMemory().
|
protected |
Definition at line 98 of file ProcessDebugger.h.
Referenced by AllocateMemory(), AttachProcess(), DeallocateMemory(), DestroyProcess(), DetachProcess(), lldb_private::ProcessWindows::DidAttach(), lldb_private::ProcessWindows::DoResume(), lldb_private::ProcessWindows::DoUpdateThreadList(), GetDebuggedProcessId(), GetMemoryRegionInfo(), HaltProcess(), LaunchProcess(), lldb_private::ProcessWindows::OnCreateThread(), OnDebugException(), lldb_private::ProcessWindows::OnDebugException(), lldb_private::NativeProcessWindows::OnDebuggerConnected(), lldb_private::ProcessWindows::OnDebuggerConnected(), OnDebuggerError(), lldb_private::ProcessWindows::OnDebuggerError(), OnExitProcess(), lldb_private::ProcessWindows::OnExitThread(), ReadMemory(), lldb_private::ProcessWindows::RefreshStateAfterStop(), lldb_private::NativeProcessWindows::Resume(), WaitForDebuggerConnection(), and WriteMemory().