mirror of
https://github.com/ivellioscolin/pykd.git
synced 2025-04-20 03:23:23 +08:00
[0.3.x] added : setCurrentProcessId, setCurrentThreadId rountines
git-svn-id: https://pykd.svn.codeplex.com/svn@87619 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
parent
ed35032124
commit
1f79e0a992
@ -150,13 +150,19 @@ inline kdlib::MEMOFFSET_64 getThreadOffset(kdlib::THREAD_DEBUG_ID id = -1)
|
||||
inline kdlib::MEMOFFSET_64 getCurrentThread()
|
||||
{
|
||||
AutoRestorePyState pystate;
|
||||
return kdlib::getThreadOffset(kdlib::getCurrentThreadId());
|
||||
return kdlib::getCurrentThread();
|
||||
}
|
||||
|
||||
inline void setCurrentThread(kdlib::THREAD_DEBUG_ID id)
|
||||
inline void setCurrentThreadId(kdlib::THREAD_DEBUG_ID id)
|
||||
{
|
||||
AutoRestorePyState pystate;
|
||||
kdlib::setCurrentThread(id);
|
||||
kdlib::setCurrentThreadById(id);
|
||||
}
|
||||
|
||||
inline void setCurrentThread(kdlib::MEMOFFSET_64 offset)
|
||||
{
|
||||
AutoRestorePyState pystate;
|
||||
kdlib::setCurrentThread(offset);
|
||||
}
|
||||
|
||||
inline void setImplicitThread(kdlib::MEMOFFSET_64 offset)
|
||||
@ -186,7 +192,19 @@ inline kdlib::PROCESS_DEBUG_ID getProcessIdByIndex(unsigned long index)
|
||||
inline kdlib::MEMOFFSET_64 getCurrentProcess()
|
||||
{
|
||||
AutoRestorePyState pystate;
|
||||
return kdlib::getProcessOffset( kdlib::getCurrentProcessId() );
|
||||
return kdlib::getCurrentProcess();
|
||||
}
|
||||
|
||||
inline void setCurrentProcess(kdlib::MEMOFFSET_64 offset)
|
||||
{
|
||||
AutoRestorePyState pystate;
|
||||
kdlib::setCurrentProcess(offset);
|
||||
}
|
||||
|
||||
inline void setCurrentProcessId( kdlib::PROCESS_DEBUG_ID id )
|
||||
{
|
||||
AutoRestorePyState pystate;
|
||||
kdlib::setCurrentProcessById(id);
|
||||
}
|
||||
|
||||
inline kdlib::PROCESS_DEBUG_ID getProcessIdByOffset( kdlib::MEMOFFSET_64 offset )
|
||||
@ -213,12 +231,6 @@ inline kdlib::MEMOFFSET_64 getProcessOffset( kdlib::PROCESS_DEBUG_ID id = -1)
|
||||
return kdlib::getProcessOffset(id);
|
||||
}
|
||||
|
||||
inline void setCurrentProcess(kdlib::PROCESS_DEBUG_ID id)
|
||||
{
|
||||
AutoRestorePyState pystate;
|
||||
kdlib::setCurrentProcess(id);
|
||||
}
|
||||
|
||||
inline void setImplicitProcess(kdlib::MEMOFFSET_64 offset)
|
||||
{
|
||||
AutoRestorePyState pystate;
|
||||
|
@ -378,12 +378,14 @@ BOOST_PYTHON_MODULE( pykd )
|
||||
"Return system process ID ( PID )" ) );
|
||||
python::def( "getProcessIdBySystemID", pykd::getProcessIdBySystemId, getProcessIdBySystemId_( python::args("Pid"),
|
||||
"Return process ID by the system's process ID ( PID )" ) );
|
||||
python::def( "setCurrentProcess", pykd::setCurrentProcess,
|
||||
"Set current process by ID" );
|
||||
python::def( "getImplicitProcess", pykd::getImplicitProcessOffset,
|
||||
"Return implicit process" );
|
||||
python::def( "getCurrentProcess", pykd::getCurrentProcess,
|
||||
"Return current offset" );
|
||||
python::def( "setCurrentProcess", pykd::setCurrentProcess,
|
||||
"Set current process" );
|
||||
python::def( "setCurrentProcessId", pykd::setCurrentProcessId,
|
||||
"Set current process by debug ID" );
|
||||
python::def( "getImplicitProcess", pykd::getImplicitProcessOffset,
|
||||
"Return implicit process" );
|
||||
python::def( "setImplicitProcess", pykd::setImplicitProcess,
|
||||
"Set implicit process" );
|
||||
python::def( "getCurrentProcessExeName", pykd::getCurrentProcessExecutableName,
|
||||
@ -409,6 +411,8 @@ BOOST_PYTHON_MODULE( pykd )
|
||||
"Return current thread offset" );
|
||||
python::def("setCurrentThread", pykd::setCurrentThread,
|
||||
"Set current thread" );
|
||||
python::def("setCurrentThreadId",pykd::setCurrentThreadId,
|
||||
"Set current thread by debug ID");
|
||||
python::def( "getImplicitThread", pykd::getImplicitThreadOffset,
|
||||
"Return implicit thread" );
|
||||
python::def( "setImplicitThread", pykd::setImplicitThread,
|
||||
|
Loading…
Reference in New Issue
Block a user