LLDB mainline
lldb_private::ProcessDebugger Class Reference

#include <ProcessDebugger.h>

Inheritance diagram for lldb_private::ProcessDebugger:
[legend]

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 DllEventAction OnLoadDll (const ModuleSpec &module_spec, lldb::addr_t module_addr, lldb::tid_t thread_id)
virtual DllEventAction OnUnloadDll (lldb::addr_t module_addr, lldb::tid_t thread_id)
virtual void OnDebugString (lldb::addr_t debug_string_addr, bool is_unicode, uint16_t length_lower_word)
virtual void OnDebuggerError (const Status &error, uint32_t type)
bool IsSystemModuleAddress (lldb::addr_t addr)

Static Public Member Functions

static bool IsSystemDLL (llvm::StringRef path)

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)
void EndDebugSession ()
 End the debug session, terminating the inferior if it still runs, and wait for the debugger thread to stop calling back into the delegate.
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)
llvm::Error ReadDebugString (lldb::addr_t debug_string_addr, bool is_unicode, uint16_t length_lower_word, llvm::SmallVectorImpl< char > &output)
 Read an OUTPUT_DEBUG_STRING_INFO payload from the inferior.
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

Detailed Description

Definition at line 52 of file ProcessDebugger.h.

Constructor & Destructor Documentation

◆ ~ProcessDebugger()

lldb_private::ProcessDebugger::~ProcessDebugger ( )
virtualdefault

References error().

Member Function Documentation

◆ AllocateMemory()

◆ AttachProcess()

◆ DeallocateMemory()

◆ DestroyProcess()

◆ DetachProcess()

Status lldb_private::ProcessDebugger::DetachProcess ( )
protected

◆ EndDebugSession()

void lldb_private::ProcessDebugger::EndDebugSession ( )
protected

End the debug session, terminating the inferior if it still runs, and wait for the debugger thread to stop calling back into the delegate.

Definition at line 315 of file ProcessDebugger.cpp.

References m_mutex, and m_session_data.

Referenced by lldb_private::NativeProcessWindows::~NativeProcessWindows().

◆ GetDebuggedProcessId()

◆ GetMemoryRegionInfo()

◆ HaltProcess()

◆ IsSystemDLL()

◆ IsSystemModuleAddress()

◆ LaunchProcess()

◆ OnCreateThread()

void lldb_private::ProcessDebugger::OnCreateThread ( const HostThread & thread)
virtual

Reimplemented in lldb_private::NativeProcessWindows, and lldb_private::ProcessWindows.

Definition at line 615 of file ProcessDebugger.cpp.

◆ OnDebugException()

◆ OnDebuggerConnected()

void lldb_private::ProcessDebugger::OnDebuggerConnected ( lldb::addr_t image_base)
virtual

Reimplemented in lldb_private::NativeProcessWindows, and lldb_private::ProcessWindows.

Definition at line 577 of file ProcessDebugger.cpp.

◆ OnDebuggerError()

void lldb_private::ProcessDebugger::OnDebuggerError ( const Status & error,
uint32_t type )
virtual

◆ OnDebugString()

void lldb_private::ProcessDebugger::OnDebugString ( lldb::addr_t debug_string_addr,
bool is_unicode,
uint16_t length_lower_word )
virtual

Reimplemented in lldb_private::NativeProcessWindows, and lldb_private::ProcessWindows.

Definition at line 634 of file ProcessDebugger.cpp.

◆ OnExitProcess()

void lldb_private::ProcessDebugger::OnExitProcess ( uint32_t exit_code)
virtual

◆ OnExitThread()

void lldb_private::ProcessDebugger::OnExitThread ( lldb::tid_t thread_id,
uint32_t exit_code )
virtual

Reimplemented in lldb_private::NativeProcessWindows, and lldb_private::ProcessWindows.

Definition at line 619 of file ProcessDebugger.cpp.

◆ OnLoadDll()

DllEventAction lldb_private::ProcessDebugger::OnLoadDll ( const ModuleSpec & module_spec,
lldb::addr_t module_addr,
lldb::tid_t thread_id )
virtual

Reimplemented in lldb_private::NativeProcessWindows, and lldb_private::ProcessWindows.

Definition at line 623 of file ProcessDebugger.cpp.

References ContinueDebugLoop.

◆ OnUnloadDll()

DllEventAction lldb_private::ProcessDebugger::OnUnloadDll ( lldb::addr_t module_addr,
lldb::tid_t thread_id )
virtual

Reimplemented in lldb_private::NativeProcessWindows, and lldb_private::ProcessWindows.

Definition at line 629 of file ProcessDebugger.cpp.

References ContinueDebugLoop.

◆ ReadDebugString()

llvm::Error lldb_private::ProcessDebugger::ReadDebugString ( lldb::addr_t debug_string_addr,
bool is_unicode,
uint16_t length_lower_word,
llvm::SmallVectorImpl< char > & output )
protected

Read an OUTPUT_DEBUG_STRING_INFO payload from the inferior.

length_lower_word is the OS-supplied low 16 bits of the string length; the helper walks 64 KiB chunks (up to 1 MiB) until it finds the NUL terminator, then strips it. Shared between ProcessWindows (in-process) and NativeProcessWindows (lldb-server).

Definition at line 641 of file ProcessDebugger.cpp.

References error(), and ReadMemory().

Referenced by lldb_private::NativeProcessWindows::OnDebugString(), and lldb_private::ProcessWindows::OnDebugString().

◆ ReadMemory()

◆ WaitForDebuggerConnection()

Status lldb_private::ProcessDebugger::WaitForDebuggerConnection ( DebuggerThreadSP debugger,
HostProcess & process )
protected

◆ WriteMemory()

Member Data Documentation

◆ m_mutex

◆ m_session_data


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