Process: added a method for getting the main module base (windows). Returns 0 on linux.

develop
Petr Mrázek 2011-07-16 23:00:28 +02:00
parent fdff604a44
commit 9f822af45a
3 changed files with 13 additions and 0 deletions

@ -120,6 +120,11 @@ void Process::getMemRanges( vector<t_memrange> & ranges )
}
}
uint32_t Process::getBase()
{
return 0;
}
static int getdir (string dir, vector<string> &files)
{
DIR *dp;

@ -330,6 +330,13 @@ void Process::getMemRanges( vector<t_memrange> & ranges )
}
}
uint32_t Process::getBase()
{
if(d)
return d->base;
return 0x400000;
}
string Process::doReadClassName (void * vptr)
{
int rtti = readDWord((uint32_t)vptr - 0x4);

@ -264,6 +264,7 @@ namespace DFHack
{
return my_descriptor;
};
uint32_t getBase();
/// get the DF Process ID
int getPID();
/// get the DF Process FilePath