pykd/pykd/dbgengine.cpp
SND\kernelnet_cp 5dc822ab1b [0.3.x] updated : test
git-svn-id: https://pykd.svn.codeplex.com/svn@84081 9b283d60-5439-405e-af05-b73fd8c4d996
2017-11-03 14:36:26 +04:00

81 lines
1.7 KiB
C++

#include "stdafx.h"
#include "kdlib/dbgengine.h"
#include "dbgengine.h"
namespace pykd {
///////////////////////////////////////////////////////////////////////////////
kdlib::ExecutionStatus targetGo()
{
kdlib::ExecutionStatus status;
PyThreadState* state = PyEval_SaveThread();
status = kdlib::targetGo();
PyEval_RestoreThread( state );
return status;
}
///////////////////////////////////////////////////////////////////////////////
void targetBreak()
{
PyThreadState* state = PyEval_SaveThread();
kdlib::targetBreak();
PyEval_RestoreThread( state );
}
///////////////////////////////////////////////////////////////////////////////
kdlib::ExecutionStatus targetStep()
{
kdlib::ExecutionStatus status;
PyThreadState* state = PyEval_SaveThread();
status = kdlib::targetStep();
PyEval_RestoreThread( state );
return status;
}
///////////////////////////////////////////////////////////////////////////////
kdlib::ExecutionStatus targetStepIn()
{
kdlib::ExecutionStatus status;
PyThreadState* state = PyEval_SaveThread();
status = kdlib::targetStepIn();
PyEval_RestoreThread( state );
return status;
}
///////////////////////////////////////////////////////////////////////////////
python::tuple getSourceLine( kdlib::MEMOFFSET_64 offset )
{
std::wstring fileName;
unsigned long lineno;
long displacement;
kdlib::getSourceLine( fileName, lineno, displacement, offset );
return python::make_tuple( fileName, lineno, displacement );
}
///////////////////////////////////////////////////////////////////////////////
} //end namespace pykd