[0.3.x] added : setFrame routine ( change current local scope )

[0.3.x] added : resetFrame routine ( resets the current scope to the default scope of the current thread )

git-svn-id: https://pykd.svn.codeplex.com/svn@89456 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
SND\kernelnet_cp 2014-12-14 10:58:29 +00:00 committed by Mikhail I. Izmestev
parent f5503a2218
commit cd271d70ec
2 changed files with 23 additions and 1 deletions

View File

@ -105,7 +105,23 @@ python::list getCurrentStack();
inline kdlib::StackFramePtr getCurrentFrame() {
AutoRestorePyState pystate;
return kdlib::getStack()->getFrame(0);
return kdlib::getCurrentStackFrame();
}
inline void setCurrentFrame( kdlib::StackFramePtr& stackFrame) {
AutoRestorePyState pystate;
kdlib::setCurrentStackFrame(stackFrame);
}
inline void setCurrentFrameByIndex( unsigned long frameIndex) {
AutoRestorePyState pystate;
kdlib::StackFramePtr stackFrame = kdlib::getStack()->getFrame(frameIndex);
kdlib::setCurrentStackFrame(stackFrame);
}
inline void resetCurrentFrame() {
AutoRestorePyState pystate;
kdlib::resetCurrentStackFrame();
}
inline python::list getParams() {

View File

@ -353,6 +353,12 @@ BOOST_PYTHON_MODULE( pykd )
"Return a current stack as a list of stackFrame objects" );
python::def( "getFrame", pykd::getCurrentFrame,
"Return a current stack frame" );
python::def( "setFrame", pykd::setCurrentFrame,
"Change current local scope" );
python::def( "setFrame", pykd::setCurrentFrameByIndex,
"Change current local scope" );
python::def( "resetFrame", pykd::resetCurrentFrame,
"Resets the current local scope to the default scope of the current thread" );
python::def( "getLocals", pykd::getLocals,
"Get list of local variables" );
python::def( "getLocal", pykd::getLocal,