[+] added : typedVarArray routine

git-svn-id: https://pykd.svn.codeplex.com/svn@60656 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
SND\kernelnet_cp 2011-01-24 16:41:47 +00:00
parent b61ac0b10a
commit 664b047dce
3 changed files with 19 additions and 0 deletions

View File

@ -102,6 +102,7 @@ BOOST_PYTHON_MODULE( pykd )
boost::python::def( "reg", &loadRegister ); boost::python::def( "reg", &loadRegister );
boost::python::def( "typedVar", &loadTypedVar ); boost::python::def( "typedVar", &loadTypedVar );
boost::python::def( "typedVarList", &loadTypedVarList ); boost::python::def( "typedVarList", &loadTypedVarList );
boost::python::def( "typedVarArray", &loadTypedVarArray );
boost::python::def( "containingRecord", &containingRecord ); boost::python::def( "containingRecord", &containingRecord );
boost::python::def( "sizeof", &sizeofType ); boost::python::def( "sizeof", &sizeofType );
boost::python::def( "loadModule", &loadModule ); boost::python::def( "loadModule", &loadModule );

View File

@ -107,6 +107,21 @@ loadTypedVarList( ULONG64 address, const std::string &moduleName, const std::str
///////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////
boost::python::object
loadTypedVarArray( ULONG64 address, const std::string &moduleName, const std::string &typeName, long number )
{
boost::python::dict objArr;
const TypeInfo& typeInfo = TypeInfo::get( moduleName, typeName );
for( long i = 0; i < number; ++i )
objArr[i] = loadTypedVar( moduleName, typeName, address + i * typeInfo.size() );
return objArr;
}
/////////////////////////////////////////////////////////////////////////////////
bool bool
isBaseType( const std::string &typeName ); isBaseType( const std::string &typeName );

View File

@ -19,6 +19,9 @@ loadTypedVar( const std::string &moduleName, const std::string &typeName, ULONG6
boost::python::object boost::python::object
loadTypedVarList( ULONG64 address, const std::string &moduleName, const std::string &typeName, const std::string &listEntryName ); loadTypedVarList( ULONG64 address, const std::string &moduleName, const std::string &typeName, const std::string &listEntryName );
boost::python::object
loadTypedVarArray( ULONG64 address, const std::string &moduleName, const std::string &typeName, long number );
boost::python::object boost::python::object
containingRecord( ULONG64 address, const std::string &moduleName, const std::string &typeName, const std::string &fieldName ); containingRecord( ULONG64 address, const std::string &moduleName, const std::string &typeName, const std::string &fieldName );