DebugServer2
Loading...
Searching...
No Matches
ds2::HardwareBreakpointManager Class Reference
Inheritance diagram for ds2::HardwareBreakpointManager:
Collaboration diagram for ds2::HardwareBreakpointManager:

Public Member Functions

 HardwareBreakpointManager (Target::ProcessBase *process)
 
ErrorCode add (Address const &address, Lifetime lifetime, size_t size, Mode mode) override
 
ErrorCode remove (Address const &address) override
 
int hit (Target::Thread *thread, Site &site) override
 
virtual size_t maxWatchpoints ()
 
void enable (Target::Thread *thread=nullptr) override
 
void disable (Target::Thread *thread=nullptr) override
 
virtual bool fillStopInfo (Target::Thread *thread, StopInfo &stopInfo) override
 
- Public Member Functions inherited from ds2::BreakpointManager
virtual void clear ()
 
virtual bool has (Address const &address) const
 
virtual void enumerate (std::function< void(Site const &)> const &cb) const
 

Protected Member Functions

ErrorCode enableLocation (Site const &site, Target::Thread *thread=nullptr) override
 
virtual ErrorCode enableLocation (Site const &site, int idx, Target::Thread *thread)
 
ErrorCode disableLocation (Site const &site, Target::Thread *thread=nullptr) override
 
virtual ErrorCode disableLocation (int idx, Target::Thread *thread)
 
bool enabled (Target::Thread *thread=nullptr) const override
 
ErrorCode isValid (Address const &address, size_t size, Mode mode) const override
 
size_t chooseBreakpointSize (Address const &address) const override
 
virtual int getAvailableLocation ()
 
virtual void enumerateThreads (Target::Thread *thread, std::function< void(Target::Thread *t)> const &cb) const
 
ErrorCode readDebugRegisters (Target::Thread *thread, std::vector< uint64_t > &regs) const
 
ErrorCode writeDebugRegisters (Target::Thread *thread, std::vector< uint64_t > &regs) const
 
- Protected Member Functions inherited from ds2::BreakpointManager
 BreakpointManager (Target::ProcessBase *process)
 
virtual bool hit (Address const &address, Site &site)
 

Protected Attributes

std::vector< uint64_t > _locations
 
std::unordered_set< ThreadId > _enabled
 
- Protected Attributes inherited from ds2::BreakpointManager
SiteMap _sites
 
Target::ProcessBase_process
 

Additional Inherited Members

- Public Types inherited from ds2::BreakpointManager
enum class  Lifetime : unsigned int { None = 0 , Permanent = (1 << 0) , TemporaryOneShot = (1 << 1) , TemporaryUntilHit = (1 << 2) }
 
enum  Mode { kModeExec = (1 << 0) , kModeRead = (1 << 1) , kModeWrite = (1 << 2) }
 
typedef std::map< uint64_t, SiteSiteMap
 

Member Function Documentation

◆ add()

ErrorCode ds2::HardwareBreakpointManager::add ( Address const & address,
Lifetime lifetime,
size_t size,
Mode mode )
overridevirtual

Reimplemented from ds2::BreakpointManager.

◆ chooseBreakpointSize()

size_t ds2::HardwareBreakpointManager::chooseBreakpointSize ( Address const & address) const
overrideprotectedvirtual

◆ disable()

void ds2::HardwareBreakpointManager::disable ( Target::Thread * thread = nullptr)
overridevirtual

Reimplemented from ds2::BreakpointManager.

◆ disableLocation()

ErrorCode ds2::HardwareBreakpointManager::disableLocation ( Site const & site,
Target::Thread * thread = nullptr )
overrideprotectedvirtual

◆ enable()

void ds2::HardwareBreakpointManager::enable ( Target::Thread * thread = nullptr)
overridevirtual

Reimplemented from ds2::BreakpointManager.

◆ enabled()

bool ds2::HardwareBreakpointManager::enabled ( Target::Thread * thread = nullptr) const
overrideprotectedvirtual

◆ enableLocation()

ErrorCode ds2::HardwareBreakpointManager::enableLocation ( Site const & site,
Target::Thread * thread = nullptr )
overrideprotectedvirtual

◆ fillStopInfo()

bool ds2::HardwareBreakpointManager::fillStopInfo ( Target::Thread * thread,
StopInfo & stopInfo )
overridevirtual

◆ hit()

int ds2::HardwareBreakpointManager::hit ( Target::Thread * thread,
Site & site )
overridevirtual

◆ isValid()

ErrorCode ds2::HardwareBreakpointManager::isValid ( Address const & address,
size_t size,
Mode mode ) const
overrideprotectedvirtual

Reimplemented from ds2::BreakpointManager.

◆ remove()

ErrorCode ds2::HardwareBreakpointManager::remove ( Address const & address)
overridevirtual

Reimplemented from ds2::BreakpointManager.


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