DebugServer2
Loading...
Searching...
No Matches
ds2::Target::Linux::Process Class Reference
Inheritance diagram for ds2::Target::Linux::Process:
Collaboration diagram for ds2::Target::Linux::Process:

Public Member Functions

ErrorCode interrupt () override
 
ErrorCode terminate () override
 
bool isAlive () const override
 
ErrorCode getMemoryRegionInfo (Address const &address, MemoryRegionInfo &info) override
 
ErrorCode readMemory (Address const &address, void *data, size_t length, size_t *count=nullptr) override
 
ErrorCode writeMemory (Address const &address, void const *data, size_t length, size_t *count=nullptr) override
 
ErrorCode allocateMemory (size_t size, uint32_t protection, uint64_t *address) override
 
ErrorCode deallocateMemory (uint64_t address, size_t size) override
 
ErrorCode wait () override
 
Host::Linux::PTraceptrace () const override
 
- Public Member Functions inherited from ds2::Target::POSIX::ELFProcess
ErrorCode getAuxiliaryVector (std::string &auxv) override
 
uint64_t getAuxiliaryVectorValue (uint64_t type) override
 
virtual ErrorCode getSharedLibraryInfoAddress (Address &address)
 
ErrorCode enumerateSharedLibraries (std::function< void(SharedLibraryInfo const &)> const &cb) override
 
virtual ErrorCode enumerateAuxiliaryVector (std::function< void(Support::ELFSupport::AuxiliaryVectorEntry const &)> const &cb)
 
- Public Member Functions inherited from ds2::Target::POSIX::Process
ErrorCode detach () override
 
ErrorCode interrupt () override
 
ErrorCode terminate () override
 
bool isAlive () const override
 
ErrorCode readString (Address const &address, std::string &str, size_t length, size_t *count=nullptr) override
 
ErrorCode readMemory (Address const &address, void *data, size_t length, size_t *count=nullptr) override
 
ErrorCode writeMemory (Address const &address, void const *data, size_t length, size_t *count=nullptr) override
 
void resetSignalPass ()
 
void setSignalPass (int signo, bool set)
 
ErrorCode wait () override
 
- Public Member Functions inherited from ds2::Target::ProcessBase
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 suspend ()
 
virtual ErrorCode resume (int signal=0, std::set< Thread * > const &excluded=std::set< Thread * >())
 
virtual ErrorCode enumerateThreads (std::function< void(Thread *)> const &cb) const
 
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 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

ErrorCode attach (int waitStatus) override
 
ErrorCode executeCode (ByteVector const &codestr, uint64_t &result)
 
ErrorCode checkMemoryErrorCode (uint64_t address)
 
ErrorCode updateInfo () override
 
ErrorCode updateAuxiliaryVector () override
 
ErrorCode readCPUState (ThreadId tid, Architecture::CPUState &state, uint32_t flags=0)
 
ErrorCode writeCPUState (ThreadId tid, Architecture::CPUState const &state, uint32_t flags=0)
 
- Protected Member Functions inherited from ds2::Target::POSIX::ELFProcess
- Protected Member Functions inherited from ds2::Target::POSIX::Process
ErrorCode initialize (ProcessId pid, uint32_t flags) override
 
ErrorCode sendInterrupt ()
 
bool checkInterrupt (ThreadId tid, int waitStatus)
 
int convertMemoryProtectionToPOSIX (uint32_t protection) const
 
uint32_t convertMemoryProtectionFromPOSIX (int POSIXProtection) const
 
- Protected Member Functions inherited from ds2::Target::ProcessBase
virtual void cleanup ()
 
virtual void insert (ThreadBase *thread)
 
virtual void remove (ThreadBase *thread)
 
virtual void removeThread (ThreadId tid)
 

Protected Attributes

Host::Linux::PTrace _ptrace
 
- Protected Attributes inherited from ds2::Target::POSIX::ELFProcess
std::string _auxiliaryVector
 
Address _sharedLibraryInfoAddress
 
- Protected Attributes inherited from ds2::Target::POSIX::Process
std::set< int > _passthruSignals
 
struct { 
 
   std::mutex   mutex 
 
   ProcessId   pid = 0 
 
_interruptState 
 
- Protected Attributes inherited from ds2::Target::ProcessBase
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 Thread
 
class POSIX::Process
 

Additional Inherited Members

- Public Types inherited from ds2::Target::ProcessBase
enum  { kFlagNewProcess = (1 << 0) , kFlagAttachedProcess = (1 << 1) }
 
typedef std::map< ThreadId, Thread * > IdentityMap
 
- Static Public Member Functions inherited from ds2::Target::POSIX::Process
static ds2::Target::Process * Create (Host::ProcessSpawner &spawner)
 
static ds2::Target::Process * Attach (ProcessId pid)
 
- Public Attributes inherited from ds2::Target::POSIX::Process

Member Function Documentation

◆ allocateMemory()

ErrorCode ds2::Target::Linux::Process::allocateMemory ( size_t size,
uint32_t protection,
uint64_t * address )
overridevirtual

◆ attach()

ErrorCode ds2::Target::Linux::Process::attach ( int waitStatus)
overrideprotectedvirtual

◆ deallocateMemory()

ErrorCode ds2::Target::Linux::Process::deallocateMemory ( uint64_t address,
size_t size )
overridevirtual

◆ getMemoryRegionInfo()

ErrorCode ds2::Target::Linux::Process::getMemoryRegionInfo ( Address const & address,
MemoryRegionInfo & info )
overridevirtual

◆ interrupt()

ErrorCode ds2::Target::Linux::Process::interrupt ( )
overridevirtual

◆ isAlive()

bool ds2::Target::Linux::Process::isAlive ( ) const
overridevirtual

◆ ptrace()

ds2::Host::Linux::PTrace & ds2::Target::Linux::Process::ptrace ( ) const
overridevirtual

◆ readMemory()

ErrorCode ds2::Target::Linux::Process::readMemory ( Address const & address,
void * data,
size_t length,
size_t * count = nullptr )
overridevirtual

◆ terminate()

ErrorCode ds2::Target::Linux::Process::terminate ( )
overridevirtual

◆ updateAuxiliaryVector()

ErrorCode ds2::Target::Linux::Process::updateAuxiliaryVector ( )
overrideprotectedvirtual

Reimplemented from ds2::Target::POSIX::ELFProcess.

◆ updateInfo()

ErrorCode ds2::Target::Linux::Process::updateInfo ( )
overrideprotectedvirtual

Reimplemented from ds2::Target::POSIX::ELFProcess.

◆ wait()

ErrorCode ds2::Target::Linux::Process::wait ( )
overridevirtual

◆ writeMemory()

ErrorCode ds2::Target::Linux::Process::writeMemory ( Address const & address,
void const * data,
size_t length,
size_t * count = nullptr )
overridevirtual

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