Linux d19 support
parent
798ce9fb0a
commit
96512a7e1d
@ -0,0 +1,46 @@
|
|||||||
|
// Just show some position data
|
||||||
|
|
||||||
|
#include <iostream>
|
||||||
|
#include <climits>
|
||||||
|
#include <integers.h>
|
||||||
|
#include <vector>
|
||||||
|
#include <sstream>
|
||||||
|
#include <ctime>
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
|
#include <DFTypes.h>
|
||||||
|
#include <DFHackAPI.h>
|
||||||
|
#include <DFProcess.h>
|
||||||
|
|
||||||
|
int main (int numargs, const char ** args)
|
||||||
|
{
|
||||||
|
uint32_t addr;
|
||||||
|
if (numargs == 2)
|
||||||
|
{
|
||||||
|
istringstream input (args[1],istringstream::in);
|
||||||
|
input >> std::hex >> addr;
|
||||||
|
}
|
||||||
|
DFHack::API DF("Memory.xml");
|
||||||
|
if(!DF.Attach())
|
||||||
|
{
|
||||||
|
cerr << "DF not found" << endl;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
DFHack::Process* p = DF.getProcess();
|
||||||
|
#ifdef LINUX_BUILD
|
||||||
|
cout << "start 0x" << hex << p->readDWord(addr+0x0) << endl;
|
||||||
|
cout << "end 0x" << hex << p->readDWord(addr+0x4) << endl;
|
||||||
|
cout << "cap 0x" << hex << p->readDWord(addr+0x8) << endl;
|
||||||
|
#else
|
||||||
|
cout << "start 0x" << hex << p->readDWord(addr+0x4) << endl;
|
||||||
|
cout << "end 0x" << hex << p->readDWord(addr+0x8) << endl;
|
||||||
|
cout << "cap 0x" << hex << p->readDWord(addr+0xC) << endl;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
#ifndef LINUX_BUILD
|
||||||
|
cout << "Done. Press any key to continue" << endl;
|
||||||
|
cin.ignore();
|
||||||
|
#endif
|
||||||
|
return 0;
|
||||||
|
}
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue