LLDB  mainline
Public Member Functions | Private Types | Private Member Functions | Private Attributes | Friends | List of all members
lldb_private::process_linux::NativeThreadLinux Class Reference

#include <NativeThreadLinux.h>

Inheritance diagram for lldb_private::process_linux::NativeThreadLinux:
Inheritance graph
[legend]
Collaboration diagram for lldb_private::process_linux::NativeThreadLinux:
Collaboration graph
[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 ()
 
- 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. More...
 
Status SingleStep (uint32_t signo)
 Single steps the thread. More...
 
void SetStoppedBySignal (uint32_t signo, const siginfo_t *info=nullptr)
 
bool IsStopped (int *signo)
 Return true if the thread is stopped. More...
 
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 (const siginfo_t *info)
 Extend m_stop_description with logical and allocation tag values. More...
 

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 115 of file NativeThreadLinux.h.

Constructor & Destructor Documentation

◆ NativeThreadLinux()

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

Definition at line 91 of file NativeThreadLinux.cpp.

Member Function Documentation

◆ AnnotateSyncTagCheckFault()

void NativeThreadLinux::AnnotateSyncTagCheckFault ( const siginfo_t *  info)
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 313 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()

std::string NativeThreadLinux::GetName ( )
overridevirtual

◆ GetProcess()

NativeProcessLinux & NativeThreadLinux::GetProcess ( )

◆ GetRegisterContext()

NativeRegisterContextLinux& lldb_private::process_linux::NativeThreadLinux::GetRegisterContext ( )
inlineoverridevirtual

◆ GetState()

lldb::StateType NativeThreadLinux::GetState ( )
overridevirtual

◆ GetStopReason()

bool NativeThreadLinux::GetStopReason ( ThreadStopInfo stop_info,
std::string description 
)
overridevirtual

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

References lldb_private::ThreadStopInfo::details, lldb::eStateStopped, lldb::eStopReasonSignal, m_state, m_stop_info, lldb_private::ThreadStopInfo::reason, lldb_private::ThreadStopInfo::signal, and lldb_private::StateIsStoppedState().

◆ IsStoppedAtBreakpoint()

bool NativeThreadLinux::IsStoppedAtBreakpoint ( )
private

◆ IsStoppedAtWatchpoint()

bool NativeThreadLinux::IsStoppedAtWatchpoint ( )
private

◆ MaybeLogStateChange()

void NativeThreadLinux::MaybeLogStateChange ( lldb::StateType  new_state)
private

◆ RemoveHardwareBreakpoint()

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

Implements lldb_private::NativeThreadProtocol.

Definition at line 196 of file NativeThreadLinux.cpp.

References m_hw_break_index_map, and m_reg_context_up.

Referenced by SetHardwareBreakpoint().

◆ RemoveWatchpoint()

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

Implements lldb_private::NativeThreadProtocol.

Definition at line 167 of file NativeThreadLinux.cpp.

References m_reg_context_up, and m_watchpoint_index_map.

Referenced by SetWatchpoint().

◆ RequestStop()

Status NativeThreadLinux::RequestStop ( )
private

◆ Resume()

Status NativeThreadLinux::Resume ( uint32_t  signo)
private

◆ SetExited()

void NativeThreadLinux::SetExited ( )
private

◆ SetHardwareBreakpoint()

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

◆ SetStopped()

void NativeThreadLinux::SetStopped ( )
private

◆ 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

◆ SetStoppedByVForkDone()

void NativeThreadLinux::SetStoppedByVForkDone ( )
private

◆ SetStoppedByWatchpoint()

void NativeThreadLinux::SetStoppedByWatchpoint ( uint32_t  wp_index)
private

◆ 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

Friends And Related Function Documentation

◆ NativeProcessLinux

friend class NativeProcessLinux
friend

Definition at line 30 of file NativeThreadLinux.h.

Member Data Documentation

◆ m_hw_break_index_map

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

Definition at line 117 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 118 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

ThreadStopInfo lldb_private::process_linux::NativeThreadLinux::m_stop_info
private

◆ m_watchpoint_index_map

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

Definition at line 116 of file NativeThreadLinux.h.

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


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