LLDB mainline
Classes | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
lldb_private::NativeRegisterContextDBReg Class Referenceabstract

#include <NativeRegisterContextDBReg.h>

Inheritance diagram for lldb_private::NativeRegisterContextDBReg:
Inheritance graph
[legend]

Classes

struct  DREG
 Debug register info for hardware breakpoints and watchpoints management. More...
 
struct  WatchpointDetails
 

Public Member Functions

 NativeRegisterContextDBReg (uint32_t enable_bit)
 
uint32_t NumSupportedHardwareBreakpoints () override
 
uint32_t SetHardwareBreakpoint (lldb::addr_t addr, size_t size) override
 
bool ClearHardwareBreakpoint (uint32_t hw_idx) override
 
Status ClearAllHardwareBreakpoints () override
 
Status GetHardwareBreakHitIndex (uint32_t &bp_index, lldb::addr_t trap_addr) override
 
uint32_t NumSupportedHardwareWatchpoints () override
 
uint32_t SetHardwareWatchpoint (lldb::addr_t addr, size_t size, uint32_t watch_flags) override
 
bool ClearHardwareWatchpoint (uint32_t hw_index) override
 
Status ClearAllHardwareWatchpoints () override
 
Status GetWatchpointHitIndex (uint32_t &wp_index, lldb::addr_t trap_addr) override
 
lldb::addr_t GetWatchpointHitAddress (uint32_t wp_index) override
 
lldb::addr_t GetWatchpointAddress (uint32_t wp_index) override
 
- Public Member Functions inherited from lldb_private::NativeRegisterContextRegisterInfo
 NativeRegisterContextRegisterInfo (NativeThreadProtocol &thread, RegisterInfoInterface *register_info_interface)
 Construct a NativeRegisterContextRegisterInfo, taking ownership of the register_info_interface pointer.
 
uint32_t GetRegisterCount () const override
 
uint32_t GetUserRegisterCount () const override
 
const RegisterInfoGetRegisterInfoAtIndex (uint32_t reg_index) const override
 
const RegisterInfoInterfaceGetRegisterInfoInterface () const
 
- Public Member Functions inherited from lldb_private::NativeRegisterContext
 NativeRegisterContext (NativeThreadProtocol &thread)
 
virtual ~NativeRegisterContext ()
 
virtual uint32_t GetRegisterCount () const =0
 
virtual uint32_t GetUserRegisterCount () const =0
 
virtual const RegisterInfoGetRegisterInfoAtIndex (uint32_t reg) const =0
 
const char * GetRegisterSetNameForRegisterAtIndex (uint32_t reg_index) const
 
virtual uint32_t GetRegisterSetCount () const =0
 
virtual const RegisterSetGetRegisterSet (uint32_t set_index) const =0
 
virtual Status ReadRegister (const RegisterInfo *reg_info, RegisterValue &reg_value)=0
 
virtual Status WriteRegister (const RegisterInfo *reg_info, const RegisterValue &reg_value)=0
 
virtual Status ReadAllRegisterValues (lldb::WritableDataBufferSP &data_sp)=0
 
virtual Status WriteAllRegisterValues (const lldb::DataBufferSP &data_sp)=0
 
uint32_t ConvertRegisterKindToRegisterNumber (uint32_t kind, uint32_t num) const
 
virtual uint32_t NumSupportedHardwareBreakpoints ()
 
virtual uint32_t SetHardwareBreakpoint (lldb::addr_t addr, size_t size)
 
virtual bool ClearHardwareBreakpoint (uint32_t hw_idx)
 
virtual Status ClearAllHardwareBreakpoints ()
 
virtual Status GetHardwareBreakHitIndex (uint32_t &bp_index, lldb::addr_t trap_addr)
 
virtual uint32_t NumSupportedHardwareWatchpoints ()
 
virtual uint32_t SetHardwareWatchpoint (lldb::addr_t addr, size_t size, uint32_t watch_flags)
 
virtual bool ClearHardwareWatchpoint (uint32_t hw_index)
 
virtual Status ClearWatchpointHit (uint32_t hw_index)
 
virtual Status ClearAllHardwareWatchpoints ()
 
virtual Status IsWatchpointHit (uint32_t wp_index, bool &is_hit)
 
virtual Status GetWatchpointHitIndex (uint32_t &wp_index, lldb::addr_t trap_addr)
 
virtual Status IsWatchpointVacant (uint32_t wp_index, bool &is_vacant)
 
virtual lldb::addr_t GetWatchpointAddress (uint32_t wp_index)
 
virtual lldb::addr_t GetWatchpointHitAddress (uint32_t wp_index)
 
virtual bool HardwareSingleStep (bool enable)
 
virtual Status ReadRegisterValueFromMemory (const lldb_private::RegisterInfo *reg_info, lldb::addr_t src_addr, size_t src_len, RegisterValue &reg_value)
 
virtual Status WriteRegisterValueToMemory (const lldb_private::RegisterInfo *reg_info, lldb::addr_t dst_addr, size_t dst_len, const RegisterValue &reg_value)
 
virtual lldb::tid_t GetThreadID () const
 
virtual NativeThreadProtocolGetThread ()
 
virtual std::vector< uint32_t > GetExpeditedRegisters (ExpeditedRegs expType) const
 
virtual bool RegisterOffsetIsDynamic () const
 
const RegisterInfoGetRegisterInfoByName (llvm::StringRef reg_name, uint32_t start_idx=0)
 
const RegisterInfoGetRegisterInfo (uint32_t reg_kind, uint32_t reg_num)
 
lldb::addr_t GetPC (lldb::addr_t fail_value=LLDB_INVALID_ADDRESS)
 
virtual lldb::addr_t GetPCfromBreakpointLocation (lldb::addr_t fail_value=LLDB_INVALID_ADDRESS)
 
Status SetPC (lldb::addr_t pc)
 
lldb::addr_t GetSP (lldb::addr_t fail_value=LLDB_INVALID_ADDRESS)
 
Status SetSP (lldb::addr_t sp)
 
lldb::addr_t GetFP (lldb::addr_t fail_value=LLDB_INVALID_ADDRESS)
 
Status SetFP (lldb::addr_t fp)
 
const char * GetRegisterName (uint32_t reg)
 
lldb::addr_t GetReturnAddress (lldb::addr_t fail_value=LLDB_INVALID_ADDRESS)
 
lldb::addr_t GetFlags (lldb::addr_t fail_value=0)
 
lldb::addr_t ReadRegisterAsUnsigned (uint32_t reg, lldb::addr_t fail_value)
 
lldb::addr_t ReadRegisterAsUnsigned (const RegisterInfo *reg_info, lldb::addr_t fail_value)
 
Status WriteRegisterFromUnsigned (uint32_t reg, uint64_t uval)
 
Status WriteRegisterFromUnsigned (const RegisterInfo *reg_info, uint64_t uval)
 

Protected Types

enum  DREGType { eDREGTypeWATCH = 0 , eDREGTypeBREAK }
 

Protected Member Functions

bool WatchpointIsEnabled (uint32_t wp_index)
 
bool BreakpointIsEnabled (uint32_t bp_index)
 
bool ValidateBreakpoint (size_t size, lldb::addr_t addr)
 
virtual std::optional< WatchpointDetailsAdjustWatchpoint (const WatchpointDetails &details)=0
 
virtual uint32_t MakeBreakControlValue (size_t size)=0
 
virtual uint32_t MakeWatchControlValue (size_t size, uint32_t watch_flags)=0
 
virtual uint32_t GetWatchpointSize (uint32_t wp_index)=0
 
virtual llvm::Error ReadHardwareDebugInfo ()=0
 
virtual llvm::Error WriteHardwareDebugRegs (DREGType hwbType)=0
 
virtual lldb::addr_t FixWatchpointHitAddress (lldb::addr_t hit_addr)
 

Protected Attributes

std::array< struct DREG, 16 > m_hbp_regs
 
std::array< struct DREG, 16 > m_hwp_regs
 
uint32_t m_max_hbp_supported
 
uint32_t m_max_hwp_supported
 
const uint32_t m_hw_dbg_enable_bit
 
- Protected Attributes inherited from lldb_private::NativeRegisterContextRegisterInfo
std::unique_ptr< RegisterInfoInterfacem_register_info_interface_up
 
- Protected Attributes inherited from lldb_private::NativeRegisterContext
NativeThreadProtocolm_thread
 

Detailed Description

Definition at line 21 of file NativeRegisterContextDBReg.h.

Member Enumeration Documentation

◆ DREGType

Enumerator
eDREGTypeWATCH 
eDREGTypeBREAK 

Definition at line 56 of file NativeRegisterContextDBReg.h.

Constructor & Destructor Documentation

◆ NativeRegisterContextDBReg()

lldb_private::NativeRegisterContextDBReg::NativeRegisterContextDBReg ( uint32_t  enable_bit)
inlineexplicit

Definition at line 24 of file NativeRegisterContextDBReg.h.

Member Function Documentation

◆ AdjustWatchpoint()

virtual std::optional< WatchpointDetails > lldb_private::NativeRegisterContextDBReg::AdjustWatchpoint ( const WatchpointDetails details)
protectedpure virtual

◆ BreakpointIsEnabled()

bool NativeRegisterContextDBReg::BreakpointIsEnabled ( uint32_t  bp_index)
protected

◆ ClearAllHardwareBreakpoints()

Status NativeRegisterContextDBReg::ClearAllHardwareBreakpoints ( )
overridevirtual

◆ ClearAllHardwareWatchpoints()

Status NativeRegisterContextDBReg::ClearAllHardwareWatchpoints ( )
overridevirtual

◆ ClearHardwareBreakpoint()

bool NativeRegisterContextDBReg::ClearHardwareBreakpoint ( uint32_t  hw_idx)
overridevirtual

◆ ClearHardwareWatchpoint()

bool NativeRegisterContextDBReg::ClearHardwareWatchpoint ( uint32_t  hw_index)
overridevirtual

◆ FixWatchpointHitAddress()

virtual lldb::addr_t lldb_private::NativeRegisterContextDBReg::FixWatchpointHitAddress ( lldb::addr_t  hit_addr)
inlineprotectedvirtual

Definition at line 94 of file NativeRegisterContextDBReg.h.

Referenced by GetWatchpointHitIndex().

◆ GetHardwareBreakHitIndex()

Status NativeRegisterContextDBReg::GetHardwareBreakHitIndex ( uint32_t &  bp_index,
lldb::addr_t  trap_addr 
)
overridevirtual

◆ GetWatchpointAddress()

lldb::addr_t NativeRegisterContextDBReg::GetWatchpointAddress ( uint32_t  wp_index)
overridevirtual

◆ GetWatchpointHitAddress()

lldb::addr_t NativeRegisterContextDBReg::GetWatchpointHitAddress ( uint32_t  wp_index)
overridevirtual

◆ GetWatchpointHitIndex()

Status NativeRegisterContextDBReg::GetWatchpointHitIndex ( uint32_t &  wp_index,
lldb::addr_t  trap_addr 
)
overridevirtual

◆ GetWatchpointSize()

virtual uint32_t lldb_private::NativeRegisterContextDBReg::GetWatchpointSize ( uint32_t  wp_index)
protectedpure virtual

◆ MakeBreakControlValue()

virtual uint32_t lldb_private::NativeRegisterContextDBReg::MakeBreakControlValue ( size_t  size)
protectedpure virtual

◆ MakeWatchControlValue()

virtual uint32_t lldb_private::NativeRegisterContextDBReg::MakeWatchControlValue ( size_t  size,
uint32_t  watch_flags 
)
protectedpure virtual

◆ NumSupportedHardwareBreakpoints()

uint32_t NativeRegisterContextDBReg::NumSupportedHardwareBreakpoints ( )
overridevirtual

◆ NumSupportedHardwareWatchpoints()

uint32_t NativeRegisterContextDBReg::NumSupportedHardwareWatchpoints ( )
overridevirtual

◆ ReadHardwareDebugInfo()

virtual llvm::Error lldb_private::NativeRegisterContextDBReg::ReadHardwareDebugInfo ( )
protectedpure virtual

◆ SetHardwareBreakpoint()

uint32_t NativeRegisterContextDBReg::SetHardwareBreakpoint ( lldb::addr_t  addr,
size_t  size 
)
overridevirtual

◆ SetHardwareWatchpoint()

uint32_t NativeRegisterContextDBReg::SetHardwareWatchpoint ( lldb::addr_t  addr,
size_t  size,
uint32_t  watch_flags 
)
overridevirtual

◆ ValidateBreakpoint()

bool lldb_private::NativeRegisterContextDBReg::ValidateBreakpoint ( size_t  size,
lldb::addr_t  addr 
)
inlineprotected

Definition at line 79 of file NativeRegisterContextDBReg.h.

Referenced by SetHardwareBreakpoint().

◆ WatchpointIsEnabled()

bool NativeRegisterContextDBReg::WatchpointIsEnabled ( uint32_t  wp_index)
protected

◆ WriteHardwareDebugRegs()

virtual llvm::Error lldb_private::NativeRegisterContextDBReg::WriteHardwareDebugRegs ( DREGType  hwbType)
protectedpure virtual

Member Data Documentation

◆ m_hbp_regs

std::array<struct DREG, 16> lldb_private::NativeRegisterContextDBReg::m_hbp_regs
protected

◆ m_hw_dbg_enable_bit

const uint32_t lldb_private::NativeRegisterContextDBReg::m_hw_dbg_enable_bit
protected

◆ m_hwp_regs

std::array<struct DREG, 16> lldb_private::NativeRegisterContextDBReg::m_hwp_regs
protected

◆ m_max_hbp_supported

uint32_t lldb_private::NativeRegisterContextDBReg::m_max_hbp_supported
protected

◆ m_max_hwp_supported

uint32_t lldb_private::NativeRegisterContextDBReg::m_max_hwp_supported
protected

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