LLDB mainline
lldb_private::process_linux::NativeThreadLinux Class Reference

#include <NativeThreadLinux.h>

Inheritance diagram for lldb_private::process_linux::NativeThreadLinux:
[legend]

Public Member Functions

 NativeThreadLinux (NativeProcessLinux &process, lldb::tid_t tid)
std::string GetName () override
lldb::StateType GetState () override
bool GetStopReason (ThreadStopInfo &stop_info, std::string &description) override
NativeRegisterContextLinuxGetRegisterContext () override
Status SetWatchpoint (lldb::addr_t addr, size_t size, uint32_t watch_flags, bool hardware) override
Status RemoveWatchpoint (lldb::addr_t addr) override
Status SetHardwareBreakpoint (lldb::addr_t addr, size_t size) override
Status RemoveHardwareBreakpoint (lldb::addr_t addr) override
NativeProcessLinuxGetProcess ()
const NativeProcessLinuxGetProcess () const
llvm::Expected< std::unique_ptr< llvm::MemoryBuffer > > GetSiginfo () const override
Public Member Functions inherited from lldb_private::NativeThreadProtocol
 NativeThreadProtocol (NativeProcessProtocol &process, lldb::tid_t tid)
virtual ~NativeThreadProtocol ()=default
lldb::tid_t GetID () const
NativeProcessProtocolGetProcess ()

Private Types

using WatchpointIndexMap = std::map<lldb::addr_t, uint32_t>

Private Member Functions

Status Resume (uint32_t signo)
 Resumes the thread.
Status SingleStep (uint32_t signo)
 Single steps the thread.
void SetStoppedBySignal (uint32_t signo, const siginfo_t *info=nullptr)
bool IsStopped (int *signo)
 Return true if the thread is stopped.
void SetStoppedByExec ()
void SetStoppedByBreakpoint ()
void SetStoppedByWatchpoint (uint32_t wp_index)
bool IsStoppedAtBreakpoint ()
bool IsStoppedAtWatchpoint ()
void SetStoppedByTrace ()
void SetStoppedByFork (bool is_vfork, lldb::pid_t child_pid)
void SetStoppedByVForkDone ()
void SetStoppedWithNoReason ()
void SetStoppedByProcessorTrace (llvm::StringRef description)
void SetExited ()
Status RequestStop ()
void MaybeLogStateChange (lldb::StateType new_state)
void SetStopped ()
void AnnotateSyncTagCheckFault (lldb::addr_t fault_addr)
 Extend m_stop_description with logical and allocation tag values.

Private Attributes

lldb::StateType m_state
std::unique_ptr< NativeRegisterContextLinuxm_reg_context_up
WatchpointIndexMap m_watchpoint_index_map
WatchpointIndexMap m_hw_break_index_map
std::unique_ptr< SingleStepWorkaroundm_step_workaround

Friends

class NativeProcessLinux

Additional Inherited Members

Protected Member Functions inherited from lldb_private::NativeThreadProtocol
void ClearStopInfo ()
Protected Attributes inherited from lldb_private::NativeThreadProtocol
NativeProcessProtocolm_process
lldb::tid_t m_tid
ThreadStopInfo m_stop_info = {}
std::string m_stop_description

Detailed Description

Definition at line 29 of file NativeThreadLinux.h.

Member Typedef Documentation

◆ WatchpointIndexMap

Definition at line 118 of file NativeThreadLinux.h.

Constructor & Destructor Documentation

◆ NativeThreadLinux()

NativeThreadLinux::NativeThreadLinux ( NativeProcessLinux & process,
lldb::tid_t tid )

Member Function Documentation

◆ AnnotateSyncTagCheckFault()

void NativeThreadLinux::AnnotateSyncTagCheckFault ( lldb::addr_t fault_addr)
private

◆ GetName()

◆ GetProcess() [1/2]

◆ GetProcess() [2/2]

const NativeProcessLinux & NativeThreadLinux::GetProcess ( ) const

◆ GetRegisterContext()

◆ GetSiginfo()

llvm::Expected< std::unique_ptr< llvm::MemoryBuffer > > NativeThreadLinux::GetSiginfo ( ) const
overridevirtual

◆ GetState()

lldb::StateType NativeThreadLinux::GetState ( )
overridevirtual

◆ GetStopReason()

◆ IsStopped()

bool NativeThreadLinux::IsStopped ( int * signo)
private

Return true if the thread is stopped.

If stopped by a signal, indicate the signo in the signo argument. Otherwise, return LLDB_INVALID_SIGNAL_NUMBER.

Definition at line 359 of file NativeThreadLinux.cpp.

References lldb::eStateStopped, lldb::eStopReasonSignal, m_state, lldb_private::NativeThreadProtocol::m_stop_info, and lldb_private::StateIsStoppedState().

◆ IsStoppedAtBreakpoint()

bool NativeThreadLinux::IsStoppedAtBreakpoint ( )
private

◆ IsStoppedAtWatchpoint()

bool NativeThreadLinux::IsStoppedAtWatchpoint ( )
private

◆ MaybeLogStateChange()

◆ RemoveHardwareBreakpoint()

Status NativeThreadLinux::RemoveHardwareBreakpoint ( lldb::addr_t addr)
overridevirtual

◆ RemoveWatchpoint()

Status NativeThreadLinux::RemoveWatchpoint ( lldb::addr_t addr)
overridevirtual

◆ RequestStop()

◆ Resume()

◆ SetExited()

void NativeThreadLinux::SetExited ( )
private

◆ SetHardwareBreakpoint()

Status NativeThreadLinux::SetHardwareBreakpoint ( lldb::addr_t addr,
size_t size )
overridevirtual

◆ SetStopped()

◆ SetStoppedByBreakpoint()

void NativeThreadLinux::SetStoppedByBreakpoint ( )
private

◆ SetStoppedByExec()

void NativeThreadLinux::SetStoppedByExec ( )
private

◆ SetStoppedByFork()

◆ SetStoppedByProcessorTrace()

void NativeThreadLinux::SetStoppedByProcessorTrace ( llvm::StringRef description)
private

◆ SetStoppedBySignal()

◆ SetStoppedByTrace()

void NativeThreadLinux::SetStoppedByTrace ( )
private

◆ SetStoppedByVForkDone()

void NativeThreadLinux::SetStoppedByVForkDone ( )
private

◆ SetStoppedByWatchpoint()

◆ SetStoppedWithNoReason()

void NativeThreadLinux::SetStoppedWithNoReason ( )
private

◆ SetWatchpoint()

Status NativeThreadLinux::SetWatchpoint ( lldb::addr_t addr,
size_t size,
uint32_t watch_flags,
bool hardware )
overridevirtual

◆ SingleStep()

Status NativeThreadLinux::SingleStep ( uint32_t signo)
private

◆ NativeProcessLinux

Member Data Documentation

◆ m_hw_break_index_map

WatchpointIndexMap lldb_private::process_linux::NativeThreadLinux::m_hw_break_index_map
private

Definition at line 120 of file NativeThreadLinux.h.

Referenced by RemoveHardwareBreakpoint(), Resume(), and SetHardwareBreakpoint().

◆ m_reg_context_up

std::unique_ptr<NativeRegisterContextLinux> lldb_private::process_linux::NativeThreadLinux::m_reg_context_up
private

◆ m_state

lldb::StateType lldb_private::process_linux::NativeThreadLinux::m_state
private

◆ m_step_workaround

std::unique_ptr<SingleStepWorkaround> lldb_private::process_linux::NativeThreadLinux::m_step_workaround
private

Definition at line 121 of file NativeThreadLinux.h.

Referenced by SetStopped(), and SingleStep().

◆ m_watchpoint_index_map

WatchpointIndexMap lldb_private::process_linux::NativeThreadLinux::m_watchpoint_index_map
private

Definition at line 119 of file NativeThreadLinux.h.

Referenced by RemoveWatchpoint(), Resume(), and SetWatchpoint().


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