mirror of
https://github.com/ivellioscolin/pykd.git
synced 2025-04-20 03:23:23 +08:00
[0.3.x] added : supported static local variables
git-svn-id: https://pykd.svn.codeplex.com/svn@91002 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
parent
332c5efc14
commit
a6e26eecd6
@ -150,6 +150,7 @@ python::list StackFrameAdapter::getLocalsList(kdlib::StackFramePtr& frame)
|
|||||||
|
|
||||||
LocalVarList localLst;
|
LocalVarList localLst;
|
||||||
unsigned long localCount;
|
unsigned long localCount;
|
||||||
|
unsigned long staticCount;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
AutoRestorePyState pystate;
|
AutoRestorePyState pystate;
|
||||||
@ -161,6 +162,16 @@ python::list StackFrameAdapter::getLocalsList(kdlib::StackFramePtr& frame)
|
|||||||
|
|
||||||
localLst.push_back( std::make_pair( paramName, param) );
|
localLst.push_back( std::make_pair( paramName, param) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
staticCount = frame->getStaticVarCount();
|
||||||
|
for (unsigned long i = 0; i < staticCount; ++i)
|
||||||
|
{
|
||||||
|
kdlib::TypedVarPtr param = frame->getStaticVar(i);
|
||||||
|
std::wstring paramName = frame->getStaticVarName(i);
|
||||||
|
|
||||||
|
localLst.push_back(std::make_pair(paramName, param));
|
||||||
|
}
|
||||||
|
|
||||||
} while(false);
|
} while(false);
|
||||||
|
|
||||||
python::list pyLst;
|
python::list pyLst;
|
||||||
@ -179,6 +190,7 @@ python::dict StackFrameAdapter::getLocalsDict(kdlib::StackFramePtr& frame)
|
|||||||
|
|
||||||
LocalVarList localLst;
|
LocalVarList localLst;
|
||||||
unsigned long localCount;
|
unsigned long localCount;
|
||||||
|
unsigned long staticCount;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
AutoRestorePyState pystate;
|
AutoRestorePyState pystate;
|
||||||
@ -190,6 +202,16 @@ python::dict StackFrameAdapter::getLocalsDict(kdlib::StackFramePtr& frame)
|
|||||||
|
|
||||||
localLst.push_back( std::make_pair( paramName, param) );
|
localLst.push_back( std::make_pair( paramName, param) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
staticCount = frame->getStaticVarCount();
|
||||||
|
for (unsigned long i = 0; i < staticCount; ++i)
|
||||||
|
{
|
||||||
|
kdlib::TypedVarPtr param = frame->getStaticVar(i);
|
||||||
|
std::wstring paramName = frame->getStaticVarName(i);
|
||||||
|
|
||||||
|
localLst.push_back(std::make_pair(paramName, param));
|
||||||
|
}
|
||||||
|
|
||||||
} while(false);
|
} while(false);
|
||||||
|
|
||||||
python::dict pyLst;
|
python::dict pyLst;
|
||||||
|
@ -60,6 +60,8 @@ public:
|
|||||||
|
|
||||||
static kdlib::TypedVarPtr getLocal( kdlib::StackFramePtr& frame, const std::wstring ¶mName ) {
|
static kdlib::TypedVarPtr getLocal( kdlib::StackFramePtr& frame, const std::wstring ¶mName ) {
|
||||||
AutoRestorePyState pystate;
|
AutoRestorePyState pystate;
|
||||||
|
if (frame->findStaticVar(paramName))
|
||||||
|
return frame->getStaticVar(paramName);
|
||||||
return frame->getLocalVar(paramName);
|
return frame->getLocalVar(paramName);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user