mirror of
https://github.com/ivellioscolin/pykd.git
synced 2025-04-20 03:23:23 +08:00
[0.3.x] added : targetProcess.getModule method
git-svn-id: https://pykd.svn.codeplex.com/svn@90645 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
parent
5d6383a9f7
commit
db13db8683
@ -562,14 +562,18 @@ BOOST_PYTHON_MODULE( pykd )
|
|||||||
"Return number of threads for this process" )
|
"Return number of threads for this process" )
|
||||||
.def("getThread", TargetProcessAdapter::getThreadByIndex,
|
.def("getThread", TargetProcessAdapter::getThreadByIndex,
|
||||||
"Return thread by its index" )
|
"Return thread by its index" )
|
||||||
.def("getThreadById", TargetProcessAdapter::getThreadById,
|
.def("getThreadById", TargetProcessAdapter::getThreadById,
|
||||||
"Return thread by its index")
|
"Return thread by its index")
|
||||||
.def("currentThread", TargetProcessAdapter::getCurrentThread,
|
.def("currentThread", TargetProcessAdapter::getCurrentThread,
|
||||||
"Return current thread" )
|
"Return current thread" )
|
||||||
.def("getNumberBreakpoints", TargetProcessAdapter::getNumberBreakpoints,
|
.def("getNumberBreakpoints", TargetProcessAdapter::getNumberBreakpoints,
|
||||||
"Return number of breakpoints for this process" )
|
"Return number of breakpoints for this process" )
|
||||||
.def("breakpoint", TargetProcessAdapter::getBreakpointByIndex, python::return_value_policy<python::manage_new_object>(),
|
.def("getBreakpoint", TargetProcessAdapter::getBreakpointByIndex, python::return_value_policy<python::manage_new_object>(),
|
||||||
"Return a breakpoint by it's index" )
|
"Return a breakpoint by it's index" )
|
||||||
|
.def("getNumberModules", TargetProcessAdapter::getNumberModules,
|
||||||
|
"Return number of modules for this process" )
|
||||||
|
.def("getModule", TargetProcessAdapter::getModuleByIndex,
|
||||||
|
"Return a module object by it's index" )
|
||||||
;
|
;
|
||||||
|
|
||||||
python::class_<kdlib::TargetThread, kdlib::TargetThreadPtr, boost::noncopyable>("targetThread", "Class representing process in the target system", python::no_init )
|
python::class_<kdlib::TargetThread, kdlib::TargetThreadPtr, boost::noncopyable>("targetThread", "Class representing process in the target system", python::no_init )
|
||||||
|
@ -192,6 +192,18 @@ struct TargetProcessAdapter {
|
|||||||
AutoRestorePyState pystate;
|
AutoRestorePyState pystate;
|
||||||
return process.isCurrent();
|
return process.isCurrent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static unsigned long getNumberModules(kdlib::TargetProcess& process)
|
||||||
|
{
|
||||||
|
AutoRestorePyState pystate;
|
||||||
|
return process.getNumberModules();
|
||||||
|
}
|
||||||
|
|
||||||
|
static kdlib::ModulePtr getModuleByIndex(kdlib::TargetProcess& process, unsigned long index)
|
||||||
|
{
|
||||||
|
AutoRestorePyState pystate;
|
||||||
|
return process.getModuleByIndex(index);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user