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

Public Member Functions

HANDLE handle () const
 
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 *nread=nullptr) override
 
ErrorCode readMemory (Address const &address, void *data, size_t length, size_t *nread=nullptr) override
 
ErrorCode writeMemory (Address const &address, void const *data, size_t length, size_t *nwritten=nullptr) override
 
ErrorCode getMemoryRegionInfo (Address const &address, MemoryRegionInfo &info) override
 
ErrorCode updateInfo () 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
 
ErrorCode enumerateSharedLibraries (std::function< void(SharedLibraryInfo const &)> const &cb) 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 getAuxiliaryVector (std::string &auxv)
 
virtual uint64_t getAuxiliaryVectorValue (uint64_t type)
 
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
 

Static Public Member Functions

static Target::Process * Create (Host::ProcessSpawner &spawner)
 
static Target::Process * Attach (ProcessId pid)
 
- Static Public Member Functions inherited from ds2::make_unique_enabler< Process >
static std::unique_ptr< Process > make_protected_unique (Args... args)
 

Protected Member Functions

ErrorCode initialize (ProcessId pid, uint32_t flags) override
 
DWORD convertMemoryProtectionToWindows (uint32_t protection) const
 
uint32_t convertMemoryProtectionFromWindows (DWORD winProtection) 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

HANDLE _handle
 
- 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
 

Additional Inherited Members

- Public Types inherited from ds2::Target::ProcessBase
enum  { kFlagNewProcess = (1 << 0) , kFlagAttachedProcess = (1 << 1) }
 
typedef std::map< ThreadId, Thread * > IdentityMap
 

Member Function Documentation

◆ allocateMemory()

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

◆ deallocateMemory()

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

◆ detach()

ErrorCode ds2::Target::Windows::Process::detach ( )
overridevirtual

◆ enumerateSharedLibraries()

ErrorCode ds2::Target::Windows::Process::enumerateSharedLibraries ( std::function< void(SharedLibraryInfo const &)> const & cb)
overridevirtual

◆ getMemoryRegionInfo()

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

◆ initialize()

ErrorCode ds2::Target::Windows::Process::initialize ( ProcessId pid,
uint32_t flags )
overrideprotectedvirtual

Reimplemented from ds2::Target::ProcessBase.

◆ interrupt()

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

◆ isAlive()

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

◆ readMemory()

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

◆ readString()

ErrorCode ds2::Target::Windows::Process::readString ( Address const & address,
std::string & str,
size_t length,
size_t * nread = nullptr )
overridevirtual

◆ terminate()

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

◆ updateInfo()

ErrorCode ds2::Target::Windows::Process::updateInfo ( )
overridevirtual

◆ wait()

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

◆ writeMemory()

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

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