|
|
@ -136,13 +136,13 @@ namespace DFHack
|
|
|
|
virtual void write(uint32_t address, uint32_t length, uint8_t* buffer) = 0;
|
|
|
|
virtual void write(uint32_t address, uint32_t length, uint8_t* buffer) = 0;
|
|
|
|
|
|
|
|
|
|
|
|
/// read an STL string
|
|
|
|
/// read an STL string
|
|
|
|
virtual const string readSTLString (uint32_t offset) = 0;
|
|
|
|
virtual const std::string readSTLString (uint32_t offset) = 0;
|
|
|
|
/// read an STL string
|
|
|
|
/// read an STL string
|
|
|
|
virtual size_t readSTLString (uint32_t offset, char * buffer, size_t bufcapacity) = 0;
|
|
|
|
virtual size_t readSTLString (uint32_t offset, char * buffer, size_t bufcapacity) = 0;
|
|
|
|
/// write an STL string
|
|
|
|
/// write an STL string
|
|
|
|
virtual void writeSTLString(const uint32_t address, const std::string writeString) = 0;
|
|
|
|
virtual void writeSTLString(const uint32_t address, const std::string writeString) = 0;
|
|
|
|
/// get class name of an object with rtti/type info
|
|
|
|
/// get class name of an object with rtti/type info
|
|
|
|
virtual string readClassName(uint32_t vptr) = 0;
|
|
|
|
virtual std::string readClassName(uint32_t vptr) = 0;
|
|
|
|
|
|
|
|
|
|
|
|
/// read a null-terminated C string
|
|
|
|
/// read a null-terminated C string
|
|
|
|
virtual const std::string readCString (uint32_t offset) = 0;
|
|
|
|
virtual const std::string readCString (uint32_t offset) = 0;
|
|
|
@ -155,9 +155,9 @@ namespace DFHack
|
|
|
|
virtual bool isIdentified() = 0;
|
|
|
|
virtual bool isIdentified() = 0;
|
|
|
|
|
|
|
|
|
|
|
|
/// find the thread IDs of the process
|
|
|
|
/// find the thread IDs of the process
|
|
|
|
virtual bool getThreadIDs(vector<uint32_t> & threads ) = 0;
|
|
|
|
virtual bool getThreadIDs(std::vector<uint32_t> & threads ) = 0;
|
|
|
|
/// get virtual memory ranges of the process (what is mapped where)
|
|
|
|
/// get virtual memory ranges of the process (what is mapped where)
|
|
|
|
virtual void getMemRanges( vector<t_memrange> & ranges ) = 0;
|
|
|
|
virtual void getMemRanges(std::vector<t_memrange> & ranges ) = 0;
|
|
|
|
|
|
|
|
|
|
|
|
/// get the flattened Memory.xml entry of this process
|
|
|
|
/// get the flattened Memory.xml entry of this process
|
|
|
|
virtual memory_info *getDescriptor() = 0;
|
|
|
|
virtual memory_info *getDescriptor() = 0;
|
|
|
@ -182,7 +182,7 @@ namespace DFHack
|
|
|
|
private:
|
|
|
|
private:
|
|
|
|
Private * const d;
|
|
|
|
Private * const d;
|
|
|
|
public:
|
|
|
|
public:
|
|
|
|
NormalProcess(uint32_t pid, vector <memory_info *> & known_versions);
|
|
|
|
NormalProcess(uint32_t pid, std::vector <memory_info *> & known_versions);
|
|
|
|
~NormalProcess();
|
|
|
|
~NormalProcess();
|
|
|
|
bool attach();
|
|
|
|
bool attach();
|
|
|
|
bool detach();
|
|
|
|
bool detach();
|
|
|
@ -214,11 +214,11 @@ namespace DFHack
|
|
|
|
void read( uint32_t address, uint32_t length, uint8_t* buffer);
|
|
|
|
void read( uint32_t address, uint32_t length, uint8_t* buffer);
|
|
|
|
void write(uint32_t address, uint32_t length, uint8_t* buffer);
|
|
|
|
void write(uint32_t address, uint32_t length, uint8_t* buffer);
|
|
|
|
|
|
|
|
|
|
|
|
const string readSTLString (uint32_t offset);
|
|
|
|
const std::string readSTLString (uint32_t offset);
|
|
|
|
size_t readSTLString (uint32_t offset, char * buffer, size_t bufcapacity);
|
|
|
|
size_t readSTLString (uint32_t offset, char * buffer, size_t bufcapacity);
|
|
|
|
void writeSTLString(const uint32_t address, const std::string writeString){};
|
|
|
|
void writeSTLString(const uint32_t address, const std::string writeString){};
|
|
|
|
// get class name of an object with rtti/type info
|
|
|
|
// get class name of an object with rtti/type info
|
|
|
|
string readClassName(uint32_t vptr);
|
|
|
|
std::string readClassName(uint32_t vptr);
|
|
|
|
|
|
|
|
|
|
|
|
const std::string readCString (uint32_t offset);
|
|
|
|
const std::string readCString (uint32_t offset);
|
|
|
|
|
|
|
|
|
|
|
@ -226,8 +226,8 @@ namespace DFHack
|
|
|
|
bool isAttached();
|
|
|
|
bool isAttached();
|
|
|
|
bool isIdentified();
|
|
|
|
bool isIdentified();
|
|
|
|
|
|
|
|
|
|
|
|
bool getThreadIDs(vector<uint32_t> & threads );
|
|
|
|
bool getThreadIDs(std::vector<uint32_t> & threads );
|
|
|
|
void getMemRanges( vector<t_memrange> & ranges );
|
|
|
|
void getMemRanges(std::vector<t_memrange> & ranges );
|
|
|
|
memory_info *getDescriptor();
|
|
|
|
memory_info *getDescriptor();
|
|
|
|
int getPID();
|
|
|
|
int getPID();
|
|
|
|
// get module index by name and version. bool 1 = error
|
|
|
|
// get module index by name and version. bool 1 = error
|
|
|
@ -246,7 +246,7 @@ namespace DFHack
|
|
|
|
Private * const d;
|
|
|
|
Private * const d;
|
|
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
public:
|
|
|
|
SHMProcess(uint32_t PID, vector <memory_info *> & known_versions);
|
|
|
|
SHMProcess(uint32_t PID, std::vector <memory_info *> & known_versions);
|
|
|
|
~SHMProcess();
|
|
|
|
~SHMProcess();
|
|
|
|
// Set up stuff so we can read memory
|
|
|
|
// Set up stuff so we can read memory
|
|
|
|
bool attach();
|
|
|
|
bool attach();
|
|
|
@ -279,11 +279,11 @@ namespace DFHack
|
|
|
|
void read( uint32_t address, uint32_t length, uint8_t* buffer);
|
|
|
|
void read( uint32_t address, uint32_t length, uint8_t* buffer);
|
|
|
|
void write(uint32_t address, uint32_t length, uint8_t* buffer);
|
|
|
|
void write(uint32_t address, uint32_t length, uint8_t* buffer);
|
|
|
|
|
|
|
|
|
|
|
|
const string readSTLString (uint32_t offset);
|
|
|
|
const std::string readSTLString (uint32_t offset);
|
|
|
|
size_t readSTLString (uint32_t offset, char * buffer, size_t bufcapacity);
|
|
|
|
size_t readSTLString (uint32_t offset, char * buffer, size_t bufcapacity);
|
|
|
|
void writeSTLString(const uint32_t address, const std::string writeString);
|
|
|
|
void writeSTLString(const uint32_t address, const std::string writeString);
|
|
|
|
// get class name of an object with rtti/type info
|
|
|
|
// get class name of an object with rtti/type info
|
|
|
|
string readClassName(uint32_t vptr);
|
|
|
|
std::string readClassName(uint32_t vptr);
|
|
|
|
|
|
|
|
|
|
|
|
const std::string readCString (uint32_t offset);
|
|
|
|
const std::string readCString (uint32_t offset);
|
|
|
|
|
|
|
|
|
|
|
@ -291,8 +291,8 @@ namespace DFHack
|
|
|
|
bool isAttached();
|
|
|
|
bool isAttached();
|
|
|
|
bool isIdentified();
|
|
|
|
bool isIdentified();
|
|
|
|
|
|
|
|
|
|
|
|
bool getThreadIDs(vector<uint32_t> & threads );
|
|
|
|
bool getThreadIDs(std::vector<uint32_t> & threads );
|
|
|
|
void getMemRanges( vector<t_memrange> & ranges );
|
|
|
|
void getMemRanges(std::vector<t_memrange> & ranges );
|
|
|
|
memory_info *getDescriptor();
|
|
|
|
memory_info *getDescriptor();
|
|
|
|
int getPID();
|
|
|
|
int getPID();
|
|
|
|
// get module index by name and version. bool 1 = error
|
|
|
|
// get module index by name and version. bool 1 = error
|
|
|
@ -311,7 +311,7 @@ namespace DFHack
|
|
|
|
Private * const d;
|
|
|
|
Private * const d;
|
|
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
public:
|
|
|
|
WineProcess(uint32_t pid, vector <memory_info *> & known_versions);
|
|
|
|
WineProcess(uint32_t pid, std::vector <memory_info *> & known_versions);
|
|
|
|
~WineProcess();
|
|
|
|
~WineProcess();
|
|
|
|
bool attach();
|
|
|
|
bool attach();
|
|
|
|
bool detach();
|
|
|
|
bool detach();
|
|
|
@ -343,11 +343,11 @@ namespace DFHack
|
|
|
|
void read( uint32_t address, uint32_t length, uint8_t* buffer);
|
|
|
|
void read( uint32_t address, uint32_t length, uint8_t* buffer);
|
|
|
|
void write(uint32_t address, uint32_t length, uint8_t* buffer);
|
|
|
|
void write(uint32_t address, uint32_t length, uint8_t* buffer);
|
|
|
|
|
|
|
|
|
|
|
|
const string readSTLString (uint32_t offset);
|
|
|
|
const std::string readSTLString (uint32_t offset);
|
|
|
|
size_t readSTLString (uint32_t offset, char * buffer, size_t bufcapacity);
|
|
|
|
size_t readSTLString (uint32_t offset, char * buffer, size_t bufcapacity);
|
|
|
|
void writeSTLString(const uint32_t address, const std::string writeString){};
|
|
|
|
void writeSTLString(const uint32_t address, const std::string writeString){};
|
|
|
|
// get class name of an object with rtti/type info
|
|
|
|
// get class name of an object with rtti/type info
|
|
|
|
string readClassName(uint32_t vptr);
|
|
|
|
std::string readClassName(uint32_t vptr);
|
|
|
|
|
|
|
|
|
|
|
|
const std::string readCString (uint32_t offset);
|
|
|
|
const std::string readCString (uint32_t offset);
|
|
|
|
|
|
|
|
|
|
|
@ -355,8 +355,8 @@ namespace DFHack
|
|
|
|
bool isAttached();
|
|
|
|
bool isAttached();
|
|
|
|
bool isIdentified();
|
|
|
|
bool isIdentified();
|
|
|
|
|
|
|
|
|
|
|
|
bool getThreadIDs(vector<uint32_t> & threads );
|
|
|
|
bool getThreadIDs(std::vector<uint32_t> & threads );
|
|
|
|
void getMemRanges( vector<t_memrange> & ranges );
|
|
|
|
void getMemRanges(std::vector<t_memrange> & ranges );
|
|
|
|
memory_info *getDescriptor();
|
|
|
|
memory_info *getDescriptor();
|
|
|
|
int getPID();
|
|
|
|
int getPID();
|
|
|
|
// get module index by name and version. bool 1 = error
|
|
|
|
// get module index by name and version. bool 1 = error
|
|
|
|