[0.3.x] added : getCurrentProcessId ( return current process debug id )

[0.3.x] added : getCurrentThreadId ( return current thread debug id )

git-svn-id: https://pykd.svn.codeplex.com/svn@88012 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
SND\kernelnet_cp 2014-04-21 06:03:37 +00:00 committed by Mikhail I. Izmestev
parent 6ece37ff95
commit 07a4dc9d3c
2 changed files with 12 additions and 2 deletions

View File

@ -195,6 +195,12 @@ inline kdlib::MEMOFFSET_64 getCurrentProcess()
return kdlib::getCurrentProcess(); return kdlib::getCurrentProcess();
} }
inline kdlib::PROCESS_DEBUG_ID getCurrentProcessId()
{
AutoRestorePyState pystate;
return kdlib::getCurrentProcessId();
}
inline void setCurrentProcess(kdlib::MEMOFFSET_64 offset) inline void setCurrentProcess(kdlib::MEMOFFSET_64 offset)
{ {
AutoRestorePyState pystate; AutoRestorePyState pystate;

View File

@ -374,6 +374,8 @@ BOOST_PYTHON_MODULE( pykd )
"Return process ID by the system's process ID ( PID )" ) ); "Return process ID by the system's process ID ( PID )" ) );
python::def( "getCurrentProcess", pykd::getCurrentProcess, python::def( "getCurrentProcess", pykd::getCurrentProcess,
"Return current offset" ); "Return current offset" );
python::def( "getCurrentProcessId", pykd::getCurrentProcessId,
"Return current process ID" );
python::def( "setCurrentProcess", pykd::setCurrentProcess, python::def( "setCurrentProcess", pykd::setCurrentProcess,
"Set current process" ); "Set current process" );
python::def( "setCurrentProcessId", pykd::setCurrentProcessId, python::def( "setCurrentProcessId", pykd::setCurrentProcessId,
@ -399,10 +401,12 @@ BOOST_PYTHON_MODULE( pykd )
"Return system thread ID ( TID )" ) ); "Return system thread ID ( TID )" ) );
python::def( "getThreadId", pykd::getThreadIdByOffset, python::def( "getThreadId", pykd::getThreadIdByOffset,
"Return thread ID by the location in the target's memory of the thread structure" ); "Return thread ID by the location in the target's memory of the thread structure" );
python::def( "getThreadId", pykd::getThreadIdBySystemId, getThreadIdBySystemId_( python::args("Tid"), python::def( "getThreadIdBySystemID", pykd::getThreadIdBySystemId, getThreadIdBySystemId_( python::args("Tid"),
"Return thread ID by the system's thread ID ( PID )" ) ); "Return thread ID by the system's thread ID ( TID )" ) );
python::def( "getCurrentThread", pykd::getCurrentThread, python::def( "getCurrentThread", pykd::getCurrentThread,
"Return current thread offset" ); "Return current thread offset" );
python::def( "getCurrentThreadId", pykd::getCurrentThreadId,
"Return current thread ID" );
python::def("setCurrentThread", pykd::setCurrentThread, python::def("setCurrentThread", pykd::setCurrentThread,
"Set current thread" ); "Set current thread" );
python::def("setCurrentThreadId",pykd::setCurrentThreadId, python::def("setCurrentThreadId",pykd::setCurrentThreadId,