mirror of
https://github.com/ivellioscolin/pykd.git
synced 2025-04-20 03:23:23 +08:00
[0.3.x] added : getNumberBreakpoint, breakpoints methods
git-svn-id: https://pykd.svn.codeplex.com/svn@89668 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
parent
ebdd06f6bd
commit
4aeefd3ec5
@ -182,6 +182,7 @@
|
||||
<ClInclude Include="pykdver.h" />
|
||||
<ClInclude Include="pymemaccess.h" />
|
||||
<ClInclude Include="pymodule.h" />
|
||||
<ClInclude Include="pyprocess.h" />
|
||||
<ClInclude Include="pysymengine.h" />
|
||||
<ClInclude Include="pythreadstate.h" />
|
||||
<ClInclude Include="pytypedvar.h" />
|
||||
|
@ -75,6 +75,9 @@
|
||||
<ClInclude Include="pyevents.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="pyprocess.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="stdafx.cpp">
|
||||
|
@ -519,6 +519,10 @@ BOOST_PYTHON_MODULE( pykd )
|
||||
"Return thread by its index" )
|
||||
.def("currentThread", TargetProcessAdapter::getCurrentThread,
|
||||
"Return current thread" )
|
||||
.def("getNumberBreakpoints", TargetProcessAdapter::getNumberBreakpoints,
|
||||
"Return number of breakpoints for this process" )
|
||||
.def("breakpoint", TargetProcessAdapter::getBreakpointByIndex,
|
||||
"Return a breakpoint by it's index" )
|
||||
;
|
||||
|
||||
python::class_<kdlib::TargetThread, kdlib::TargetThreadPtr, boost::noncopyable>("targetThread", "Class representing process in the target system", python::no_init )
|
||||
@ -528,6 +532,8 @@ BOOST_PYTHON_MODULE( pykd )
|
||||
"Return TEB address" )
|
||||
.def("setCurrent", TargetThreadAdapter::setCurrent,
|
||||
"Set this thread current")
|
||||
.def("isCurrent", TargetThreadAdapter::isCurrent,
|
||||
"Check if this thread is current")
|
||||
;
|
||||
|
||||
python::class_<kdlib::Module, kdlib::ModulePtr, python::bases<kdlib::NumBehavior>, boost::noncopyable>("module", "Class representing executable module", python::no_init )
|
||||
|
@ -61,6 +61,18 @@ struct TargetProcessAdapter {
|
||||
AutoRestorePyState pystate;
|
||||
return process.getCurrentThread();
|
||||
}
|
||||
|
||||
static unsigned long getNumberBreakpoints(kdlib::TargetProcess& process)
|
||||
{
|
||||
AutoRestorePyState pystate;
|
||||
return process.getNumberBreakpoints();
|
||||
}
|
||||
|
||||
static kdlib::BreakpointPtr getBreakpointByIndex(kdlib::TargetProcess& process, unsigned long index)
|
||||
{
|
||||
AutoRestorePyState pystate;
|
||||
return process.getBreakpoint(index);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@ -83,6 +95,12 @@ struct TargetThreadAdapter {
|
||||
AutoRestorePyState pystate;
|
||||
return thread.setCurrent();
|
||||
}
|
||||
|
||||
static bool isCurrent(kdlib::TargetThread& thread)
|
||||
{
|
||||
AutoRestorePyState pystate;
|
||||
return thread.isCurrent();
|
||||
}
|
||||
};
|
||||
|
||||
} // pykd namespace
|
||||
|
Loading…
Reference in New Issue
Block a user