mirror of
https://github.com/ivellioscolin/pykd.git
synced 2025-04-21 12:53:23 +08:00
[0.2.x] added : getStackWow64 routine prototype
git-svn-id: https://pykd.svn.codeplex.com/svn@81697 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
parent
bf55de75c6
commit
ca3e1c8d06
@ -69,6 +69,8 @@ struct STACK_FRAME_DESC {
|
|||||||
|
|
||||||
void getStackTrace(std::vector<STACK_FRAME_DESC> &frames);
|
void getStackTrace(std::vector<STACK_FRAME_DESC> &frames);
|
||||||
|
|
||||||
|
void getStackTraceWow64(std::vector<STACK_FRAME_DESC> &frames);
|
||||||
|
|
||||||
// callback events
|
// callback events
|
||||||
|
|
||||||
enum DEBUG_CALLBACK_RESULT {
|
enum DEBUG_CALLBACK_RESULT {
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
#define PYKD_VERSION_MAJOR 0
|
#define PYKD_VERSION_MAJOR 0
|
||||||
#define PYKD_VERSION_MINOR 2
|
#define PYKD_VERSION_MINOR 2
|
||||||
#define PYKD_VERSION_SUBVERSION 0
|
#define PYKD_VERSION_SUBVERSION 0
|
||||||
#define PYKD_VERSION_BUILDNO 6
|
#define PYKD_VERSION_BUILDNO 7
|
||||||
|
|
||||||
|
|
||||||
#define __VER_STR2__(x) #x
|
#define __VER_STR2__(x) #x
|
||||||
|
@ -246,6 +246,8 @@ BOOST_PYTHON_MODULE( pykd )
|
|||||||
// stack and local variables
|
// stack and local variables
|
||||||
python::def( "getStack", &getCurrentStack,
|
python::def( "getStack", &getCurrentStack,
|
||||||
"Return a current stack as a list of stackFrame objects" );
|
"Return a current stack as a list of stackFrame objects" );
|
||||||
|
python::def( "getStackWow64", &getCurrentStackWow64,
|
||||||
|
"Return a stack for wow64 context as a list of stackFrame objects" );
|
||||||
python::def( "getFrame", &getCurrentStackFrame,
|
python::def( "getFrame", &getCurrentStackFrame,
|
||||||
"Return a current stack frame" );
|
"Return a current stack frame" );
|
||||||
python::def( "getLocals", &getLocals,
|
python::def( "getLocals", &getLocals,
|
||||||
|
@ -365,6 +365,24 @@ python::list getCurrentStack()
|
|||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
python::list getCurrentStackWow64()
|
||||||
|
{
|
||||||
|
std::vector<STACK_FRAME_DESC> frames;
|
||||||
|
getStackTraceWow64( frames );
|
||||||
|
|
||||||
|
python::list frameList;
|
||||||
|
|
||||||
|
for ( ULONG i = 0; i < frames.size(); ++i )
|
||||||
|
{
|
||||||
|
python::object frameObj( StackFramePtr( new StackFrame( frames.at(i) ) ) );
|
||||||
|
frameList.append( frameObj );
|
||||||
|
}
|
||||||
|
|
||||||
|
return frameList;
|
||||||
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
StackFramePtr getCurrentStackFrame()
|
StackFramePtr getCurrentStackFrame()
|
||||||
{
|
{
|
||||||
std::vector<STACK_FRAME_DESC> frames;
|
std::vector<STACK_FRAME_DESC> frames;
|
||||||
|
@ -136,6 +136,8 @@ StackFramePtr getCurrentStackFrame();
|
|||||||
|
|
||||||
python::list getCurrentStack();
|
python::list getCurrentStack();
|
||||||
|
|
||||||
|
python::list getCurrentStackWow64();
|
||||||
|
|
||||||
ScopeVarsPtr getLocals();
|
ScopeVarsPtr getLocals();
|
||||||
|
|
||||||
ScopeVarsPtr getParams();
|
ScopeVarsPtr getParams();
|
||||||
|
@ -750,6 +750,15 @@ void getStackTrace(std::vector<STACK_FRAME_DESC> &frames)
|
|||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void getStackTraceWow64(std::vector<STACK_FRAME_DESC> &frames)
|
||||||
|
{
|
||||||
|
PyThread_StateRestore pyThreadRestore( g_dbgEng->pystate );
|
||||||
|
|
||||||
|
frames.resize(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
std::string processorToStr(ULONG processorMode)
|
std::string processorToStr(ULONG processorMode)
|
||||||
{
|
{
|
||||||
switch( processorMode )
|
switch( processorMode )
|
||||||
|
Loading…
Reference in New Issue
Block a user