mirror of
https://github.com/ivellioscolin/pykd.git
synced 2025-04-21 21:03:23 +08:00
69 lines
1.4 KiB
C++
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 );
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|