mirror of
https://github.com/ivellioscolin/pykd.git
synced 2025-04-20 03:23:23 +08:00
[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:
parent
f5503a2218
commit
cd271d70ec
@ -105,7 +105,23 @@ python::list getCurrentStack();
|
|||||||
|
|
||||||
inline kdlib::StackFramePtr getCurrentFrame() {
|
inline kdlib::StackFramePtr getCurrentFrame() {
|
||||||
AutoRestorePyState pystate;
|
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() {
|
inline python::list getParams() {
|
||||||
|
@ -353,6 +353,12 @@ BOOST_PYTHON_MODULE( pykd )
|
|||||||
"Return a current stack as a list of stackFrame objects" );
|
"Return a current stack as a list of stackFrame objects" );
|
||||||
python::def( "getFrame", pykd::getCurrentFrame,
|
python::def( "getFrame", pykd::getCurrentFrame,
|
||||||
"Return a current stack frame" );
|
"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,
|
python::def( "getLocals", pykd::getLocals,
|
||||||
"Get list of local variables" );
|
"Get list of local variables" );
|
||||||
python::def( "getLocal", pykd::getLocal,
|
python::def( "getLocal", pykd::getLocal,
|
||||||
|
Loading…
Reference in New Issue
Block a user