pykd/pykd/dbgmodule.h
SND\kernelnet_cp 5f7636ac4b ready for release
git-svn-id: https://pykd.svn.codeplex.com/svn@52944 9b283d60-5439-405e-af05-b73fd8c4d996
2010-07-26 10:55:12 +00:00

69 lines
1.4 KiB
C++

#pragma once
#include <string>
#include <boost/python.hpp>
#include <boost/python/object.hpp>
/////////////////////////////////////////////////////////////////////////////////
class dbgModuleClass {
public:
dbgModuleClass() :
m_base( 0 ),
m_end( 0 )
{}
dbgModuleClass( const std::string &name, ULONG64 base, ULONG size ) :
m_name( name ),
m_base( base ),
m_end( base + size )
{}
ULONG64
getBegin() const {
return m_base;
}
ULONG64
getEnd() const {
return m_end;
}
bool
contain( ULONG64 addr ) const {
if ( *( (ULONG*)&addr + 1 ) == 0 )
*( (ULONG*)&addr + 1 ) = 0xFFFFFFFF;
return m_base <= addr && addr <= m_end;
}
std::string
getName() const {
return m_name;
}
void
reloadSymbols();
private:
ULONG64 m_base;
ULONG64 m_end;
std::string m_name;
};
/////////////////////////////////////////////////////////////////////////////////
boost::python::object
loadModule( const std::string &moduleName );
boost::python::object
findModule( ULONG64 addr );
/////////////////////////////////////////////////////////////////////////////////