DebugServer2
Loading...
Searching...
No Matches
ds2::Target::ProcessBase Class Referenceabstract
Inheritance diagram for ds2::Target::ProcessBase:
Collaboration diagram for ds2::Target::ProcessBase:

Public Types

enum  { kFlagNewProcess = (1 << 0) , kFlagAttachedProcess = (1 << 1) }
 
typedef std::map< ThreadId, Thread * > IdentityMap
 

Public Member Functions

ProcessId pid () const
 
bool attached () const
 
Address const & loadBase () const
 
Address const & entryPoint () const
 
Thread * currentThread () const
 
Thread * thread (ThreadId tid) const
 
virtual ErrorCode getInfo (ProcessInfo &info)
 
virtual ErrorCode getAuxiliaryVector (std::string &auxv)
 
virtual uint64_t getAuxiliaryVectorValue (uint64_t type)
 
virtual ErrorCode detach ()=0
 
virtual ErrorCode suspend ()
 
virtual ErrorCode resume (int signal=0, std::set< Thread * > const &excluded=std::set< Thread * >())
 
virtual ErrorCode interrupt ()=0
 
virtual ErrorCode terminate ()=0
 
virtual bool isAlive () const =0
 
virtual ErrorCode enumerateThreads (std::function< void(Thread *)> const &cb) const
 
virtual ErrorCode readString (Address const &address, std::string &str, size_t length, size_t *nread=nullptr)=0
 
virtual ErrorCode readMemory (Address const &address, void *buffer, size_t length, size_t *nread=nullptr)=0
 
virtual ErrorCode writeMemory (Address const &address, void const *buffer, size_t length, size_t *nwritten=nullptr)=0
 
virtual ErrorCode enumerateSharedLibraries (std::function< void(SharedLibraryInfo const &)> const &cb)=0
 
virtual ErrorCode enumerateMappedFiles (std::function< void(MappedFileInfo const &)> const &cb)
 
ErrorCode readMemoryBuffer (Address const &address, size_t length, ByteVector &buffer)
 
ErrorCode writeMemoryBuffer (Address const &address, ByteVector const &buffer, size_t *nwritten=nullptr)
 
ErrorCode writeMemoryBuffer (Address const &address, ByteVector const &buffer, size_t length, size_t *nwritten=nullptr)
 
virtual ErrorCode wait ()=0
 
virtual ErrorCode allocateMemory (size_t size, uint32_t protection, uint64_t *address)=0
 
virtual ErrorCode deallocateMemory (uint64_t address, size_t size)=0
 
virtual ErrorCode getMemoryRegionInfo (Address const &address, MemoryRegionInfo &info)=0
 
virtual void getThreadIds (std::vector< ThreadId > &tids)
 
virtual SoftwareBreakpointManagersoftwareBreakpointManager () const final
 
virtual HardwareBreakpointManagerhardwareBreakpointManager () const final
 
virtual void prepareForDetach ()
 
virtual ErrorCode beforeResume ()
 
virtual ErrorCode afterResume ()
 
virtual int getMaxBreakpoints () const
 
virtual int getMaxWatchpoints () const
 
virtual int getMaxWatchpointSize () const
 
virtual Architecture::GDBDescriptor const * getGDBRegistersDescriptor () const final
 
virtual Architecture::LLDBDescriptor const * getLLDBRegistersDescriptor () const final
 

Protected Member Functions

virtual ErrorCode initialize (ProcessId pid, uint32_t flags)
 
virtual void cleanup ()
 
virtual ErrorCode updateInfo ()=0
 
virtual void insert (ThreadBase *thread)
 
virtual void remove (ThreadBase *thread)
 
virtual void removeThread (ThreadId tid)
 

Protected Attributes

bool _terminated
 
uint32_t _flags
 
ProcessId _pid
 
ProcessInfo _info
 
Address _loadBase
 
Address _entryPoint
 
IdentityMap _threads
 
Thread * _currentThread
 
std::unique_ptr< SoftwareBreakpointManager_softwareBreakpointManager
 
std::unique_ptr< HardwareBreakpointManager_hardwareBreakpointManager
 

Friends

class ThreadBase
 

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