mirror of
https://github.com/ivellioscolin/pykd.git
synced 2025-04-22 05:13:22 +08:00
[+] added : ptrMWord, ptrSignMWord for reading target's machine word ( 32 or 64 bits ) from memory
git-svn-id: https://pykd.svn.codeplex.com/svn@58965 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
parent
ca6c731376
commit
c486a6c782
@ -131,6 +131,8 @@ BOOST_PYTHON_MODULE( pykd )
|
|||||||
boost::python::def( "ptrQWord", &loadByPtr<unsigned __int64> );
|
boost::python::def( "ptrQWord", &loadByPtr<unsigned __int64> );
|
||||||
boost::python::def( "ptrSignQWord", &loadByPtr<__int64> );
|
boost::python::def( "ptrSignQWord", &loadByPtr<__int64> );
|
||||||
boost::python::def( "ptrPtr", &loadPtrByPtr );
|
boost::python::def( "ptrPtr", &loadPtrByPtr );
|
||||||
|
boost::python::def( "ptrMWord", &loadMWord );
|
||||||
|
boost::python::def( "ptrSignMWord", &loadSignMWord );
|
||||||
boost::python::def( "compareMemory", &compareMemory, compareMemoryOver( boost::python::args( "addr1", "addr2", "length", "phyAddr" ), "" ) );
|
boost::python::def( "compareMemory", &compareMemory, compareMemoryOver( boost::python::args( "addr1", "addr2", "length", "phyAddr" ), "" ) );
|
||||||
boost::python::def( "getCurrentStack", &getCurrentStack );
|
boost::python::def( "getCurrentStack", &getCurrentStack );
|
||||||
boost::python::def( "reloadModule", &reloadModule );
|
boost::python::def( "reloadModule", &reloadModule );
|
||||||
|
@ -179,6 +179,36 @@ loadPtrByPtr( ULONG64 address )
|
|||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
ULONG64
|
||||||
|
loadMWord( ULONG64 address )
|
||||||
|
{
|
||||||
|
ULONG64 value = 0;
|
||||||
|
|
||||||
|
if ( is64bitSystem() )
|
||||||
|
loadMemory( address, &value, sizeof(ULONG64) );
|
||||||
|
else
|
||||||
|
loadMemory( address, &value, sizeof(ULONG) );
|
||||||
|
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
LONG64
|
||||||
|
loadSignMWord( ULONG64 address )
|
||||||
|
{
|
||||||
|
LONG64 value = 0;
|
||||||
|
|
||||||
|
if ( is64bitSystem() )
|
||||||
|
loadMemory( address, &value, sizeof(LONG64) );
|
||||||
|
else
|
||||||
|
loadMemory( address, &value, sizeof(LONG) );
|
||||||
|
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
boost::python::object
|
boost::python::object
|
||||||
loadUnicodeStr( ULONG64 address )
|
loadUnicodeStr( ULONG64 address )
|
||||||
{
|
{
|
||||||
|
@ -12,6 +12,12 @@ loadMemory( ULONG64 address, PVOID dest, ULONG length, BOOLEAN phyAddr = FALSE )
|
|||||||
ULONG64
|
ULONG64
|
||||||
loadPtrByPtr( ULONG64 address );
|
loadPtrByPtr( ULONG64 address );
|
||||||
|
|
||||||
|
ULONG64
|
||||||
|
loadMWord( ULONG64 address );
|
||||||
|
|
||||||
|
LONG64
|
||||||
|
loadSignMWord( ULONG64 address );
|
||||||
|
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
boost::python::object
|
boost::python::object
|
||||||
|
Loading…
Reference in New Issue
Block a user