|
|
|
@ -16,7 +16,7 @@ void DumpObjStr0Vector (const char * name, DFHack::Process *p, uint32_t addr)
|
|
|
|
|
{
|
|
|
|
|
cout << "----==== " << name << " ====----" << endl;
|
|
|
|
|
DFHack::DfVector vect(p,addr,4);
|
|
|
|
|
for(int i = 0; i < vect.getSize();i++)
|
|
|
|
|
for(uint32_t i = 0; i < vect.getSize();i++)
|
|
|
|
|
{
|
|
|
|
|
uint32_t addr = *(uint32_t *) vect[i];
|
|
|
|
|
cout << p->readSTLString(addr) << endl;
|
|
|
|
@ -27,7 +27,7 @@ void DumpObjVtables (const char * name, DFHack::Process *p, uint32_t addr)
|
|
|
|
|
{
|
|
|
|
|
cout << "----==== " << name << " ====----" << endl;
|
|
|
|
|
DFHack::DfVector vect(p,addr,4);
|
|
|
|
|
for(int i = 0; i < vect.getSize();i++)
|
|
|
|
|
for(uint32_t i = 0; i < vect.getSize();i++)
|
|
|
|
|
{
|
|
|
|
|
uint32_t addr = *(uint32_t *) vect[i];
|
|
|
|
|
uint32_t vptr = p->readDWord(addr);
|
|
|
|
@ -39,7 +39,7 @@ void DumpDWordVector (const char * name, DFHack::Process *p, uint32_t addr)
|
|
|
|
|
{
|
|
|
|
|
cout << "----==== " << name << " ====----" << endl;
|
|
|
|
|
DFHack::DfVector vect(p,addr,4);
|
|
|
|
|
for(int i = 0; i < vect.getSize();i++)
|
|
|
|
|
for(uint32_t i = 0; i < vect.getSize();i++)
|
|
|
|
|
{
|
|
|
|
|
uint32_t number = *(uint32_t *) vect[i];
|
|
|
|
|
cout << number << endl;
|
|
|
|
@ -56,7 +56,7 @@ void hexdump (DFHack::API& DF, uint32_t address, uint32_t length)
|
|
|
|
|
char *buf = new char[length * 16];
|
|
|
|
|
|
|
|
|
|
DF.ReadRaw(address, length * 16, (uint8_t *) buf);
|
|
|
|
|
for (int i = 0; i < length; i++)
|
|
|
|
|
for (uint32_t i = 0; i < length; i++)
|
|
|
|
|
{
|
|
|
|
|
// leading offset
|
|
|
|
|
cout << "0x" << hex << setw(8) << address + i*16 << "| ";
|
|
|
|
@ -81,7 +81,7 @@ void interleave_hex (DFHack::API& DF, vector < uint32_t > & addresses, uint32_t
|
|
|
|
|
{
|
|
|
|
|
vector <char * > bufs;
|
|
|
|
|
|
|
|
|
|
for(int counter = 0; counter < addresses.size(); counter ++)
|
|
|
|
|
for(uint32_t counter = 0; counter < addresses.size(); counter ++)
|
|
|
|
|
{
|
|
|
|
|
char * buf = new char[length * 16];
|
|
|
|
|
DF.ReadRaw(addresses[counter], length * 16, (uint8_t *) buf);
|
|
|
|
@ -91,13 +91,13 @@ void interleave_hex (DFHack::API& DF, vector < uint32_t > & addresses, uint32_t
|
|
|
|
|
|
|
|
|
|
// output a header
|
|
|
|
|
cout << "line offset ";
|
|
|
|
|
for (int obj = 0; obj < addresses.size(); obj++)
|
|
|
|
|
for (uint32_t obj = 0; obj < addresses.size(); obj++)
|
|
|
|
|
{
|
|
|
|
|
cout << "0x" << hex << setw(9) << addresses[obj] << " ";
|
|
|
|
|
}
|
|
|
|
|
cout << endl;
|
|
|
|
|
|
|
|
|
|
for(int offs = 0 ; offs < length * 16; offs += 4)
|
|
|
|
|
for(uint32_t offs = 0 ; offs < length * 16; offs += 4)
|
|
|
|
|
{
|
|
|
|
|
if((!(offs % 16)) && offs != 0)
|
|
|
|
|
{
|
|
|
|
@ -107,7 +107,7 @@ void interleave_hex (DFHack::API& DF, vector < uint32_t > & addresses, uint32_t
|
|
|
|
|
cout << dec << setw(4) << offs/4 << " ";
|
|
|
|
|
cout << setfill('0');
|
|
|
|
|
cout << "0x" << hex << setw(4) << offs << " ";
|
|
|
|
|
for (int object = 0; object < bufs.size(); object++)
|
|
|
|
|
for (uint32_t object = 0; object < bufs.size(); object++)
|
|
|
|
|
{
|
|
|
|
|
// bytes
|
|
|
|
|
for(int k = 0; k < 4; k++)
|
|
|
|
@ -119,7 +119,7 @@ void interleave_hex (DFHack::API& DF, vector < uint32_t > & addresses, uint32_t
|
|
|
|
|
}
|
|
|
|
|
cout << endl;
|
|
|
|
|
}
|
|
|
|
|
for(int counter = 0; counter < addresses.size(); counter ++)
|
|
|
|
|
for(uint32_t counter = 0; counter < addresses.size(); counter ++)
|
|
|
|
|
{
|
|
|
|
|
delete bufs[counter];
|
|
|
|
|
}
|
|
|
|
|