mirror of
https://github.com/ivellioscolin/pykd.git
synced 2025-04-29 11:53:23 +08:00
[0.2.x] added : pageSize routines
git-svn-id: https://pykd.svn.codeplex.com/svn@78897 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
parent
8a41abcd13
commit
baa4531964
@ -31,6 +31,7 @@ void eprintln( const std::wstring &str );
|
||||
// system properties
|
||||
ULONG ptrSize();
|
||||
bool is64bitSystem();
|
||||
ULONG getPageSize();
|
||||
|
||||
//manage debug module
|
||||
ULONG64 findModuleBase( const std::string &moduleName );
|
||||
|
@ -106,6 +106,8 @@ BOOST_PYTHON_MODULE( pykd )
|
||||
"Return effective pointer size" );
|
||||
python::def( "is64bitSystem", &is64bitSystem,
|
||||
"Check if target system has 64 address space" );
|
||||
python::def( "getPageSize", &getPageSize,
|
||||
"Get the page size for the currently executing processor context" );
|
||||
|
||||
// Manage target memory access
|
||||
|
||||
|
@ -522,6 +522,22 @@ bool is64bitSystem()
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ULONG getPageSize()
|
||||
{
|
||||
PyThread_StateRestore pyThreadRestore( g_dbgEng->pystate );
|
||||
|
||||
HRESULT hres;
|
||||
ULONG pageSize;
|
||||
|
||||
hres = g_dbgEng->control->GetPageSize( &pageSize );
|
||||
if ( FAILED( hres ) )
|
||||
throw DbgException( "IDebugControl::GetPageSize failed" );
|
||||
|
||||
return pageSize;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ULONG64 loadMSR( ULONG msr )
|
||||
{
|
||||
PyThread_StateRestore pyThreadRestore( g_dbgEng->pystate );
|
||||
|
Loading…
Reference in New Issue
Block a user