mirror of
https://github.com/ivellioscolin/pykd.git
synced 2025-04-21 04:13:22 +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
@ -568,8 +568,12 @@ BOOST_PYTHON_MODULE( pykd )
|
||||
"Return current thread" )
|
||||
.def("getNumberBreakpoints", TargetProcessAdapter::getNumberBreakpoints,
|
||||
"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" )
|
||||
.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 )
|
||||
|
@ -192,6 +192,18 @@ struct TargetProcessAdapter {
|
||||
AutoRestorePyState pystate;
|
||||
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