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
ThreadStopInfo m_stop_info
std::unique_ptr< NativeRegisterContextLinuxm_reg_context_up
std::string m_stop_description
WatchpointIndexMap m_watchpoint_index_map
WatchpointIndexMap m_hw_break_index_map
std::unique_ptr< SingleStepWorkaroundm_step_workaround

Friends

class NativeProcessLinux

Additional Inherited Members

Protected Attributes inherited from lldb_private::NativeThreadProtocol
NativeProcessProtocolm_process
lldb::tid_t m_tid

Detailed Description

Definition at line 29 of file NativeThreadLinux.h.

Member Typedef Documentation

◆ WatchpointIndexMap

Definition at line 120 of file NativeThreadLinux.h.

Constructor & Destructor Documentation

◆ NativeThreadLinux()

Member Function Documentation

◆ AnnotateSyncTagCheckFault()

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

Extend m_stop_description with logical and allocation tag values.

If there is an error along the way just add the information we were able to get.

Definition at line 312 of file NativeThreadLinux.cpp.

References lldb_private::MemoryTagManagerAArch64MTE::eMTE_allocation, lldb_private::process_linux::NativeRegisterContextLinux::GetMemoryTaggingDetails(), GetProcess(), GetRegisterContext(), m_stop_description, lldb_private::process_linux::NativeProcessLinux::ReadMemoryTags(), and lldb_private::Status::Success().

Referenced by SetStoppedBySignal().

◆ 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 364 of file NativeThreadLinux.cpp.

References lldb::eStateStopped, lldb::eStopReasonSignal, m_state, 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()

void NativeThreadLinux::SetStoppedByFork ( bool is_vfork,
lldb::pid_t child_pid )
private

◆ SetStoppedByProcessorTrace()

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

◆ SetStoppedBySignal()

void NativeThreadLinux::SetStoppedBySignal ( uint32_t signo,
const siginfo_t * info = nullptr )
private

◆ SetStoppedByTrace()

void NativeThreadLinux::SetStoppedByTrace ( )
private

Definition at line 447 of file NativeThreadLinux.cpp.

References lldb::eStopReasonTrace, m_stop_info, SetStopped(), and SIGTRAP.

◆ SetStoppedByVForkDone()

void NativeThreadLinux::SetStoppedByVForkDone ( )
private

Definition at line 467 of file NativeThreadLinux.cpp.

References lldb::eStopReasonVForkDone, m_stop_info, SetStopped(), and SIGTRAP.

◆ SetStoppedByWatchpoint()

void NativeThreadLinux::SetStoppedByWatchpoint ( uint32_t wp_index)
private

◆ SetStoppedWithNoReason()

void NativeThreadLinux::SetStoppedWithNoReason ( )
private

Definition at line 474 of file NativeThreadLinux.cpp.

References lldb::eStopReasonNone, m_stop_info, and SetStopped().

◆ 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 122 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 123 of file NativeThreadLinux.h.

Referenced by SetStopped(), and SingleStep().

◆ m_stop_description

std::string lldb_private::process_linux::NativeThreadLinux::m_stop_description
private

◆ m_stop_info

◆ m_watchpoint_index_map

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

Definition at line 121 of file NativeThreadLinux.h.

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


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