mirror of
https://github.com/ivellioscolin/pykd.git
synced 2025-04-21 12:53:23 +08:00
[0.3.x] updated : targetBreak
git-svn-id: https://pykd.svn.codeplex.com/svn@83968 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
parent
446a006a40
commit
89bb1c89ac
@ -19,6 +19,39 @@ void targetGo()
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void targetBreak()
|
||||
{
|
||||
PyThreadState* state = PyEval_SaveThread();
|
||||
|
||||
kdlib::targetBreak();
|
||||
|
||||
PyEval_RestoreThread( state );
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void targetStep()
|
||||
{
|
||||
PyThreadState* state = PyEval_SaveThread();
|
||||
|
||||
kdlib::targetStep();
|
||||
|
||||
PyEval_RestoreThread( state );
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void targetStepIn()
|
||||
{
|
||||
PyThreadState* state = PyEval_SaveThread();
|
||||
|
||||
kdlib::targetStepIn();
|
||||
|
||||
PyEval_RestoreThread( state );
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
python::tuple getSourceLine( kdlib::MEMOFFSET_64 offset )
|
||||
{
|
||||
std::wstring fileName;
|
||||
|
@ -10,6 +10,9 @@ namespace pykd {
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void targetGo();
|
||||
void targetBreak();
|
||||
void targetStep();
|
||||
void targetStepIn();
|
||||
|
||||
python::tuple getSourceLine( kdlib::MEMOFFSET_64 offset = 0 );
|
||||
|
||||
|
@ -14,32 +14,6 @@
|
||||
|
||||
using namespace pykd;
|
||||
|
||||
|
||||
//
|
||||
//#include "pykdver.h"
|
||||
//
|
||||
//#include "dbgengine.h"
|
||||
//#include "symengine.h"
|
||||
//
|
||||
//#include "module.h"
|
||||
//#include "variant.h"
|
||||
//#include "dbgexcept.h"
|
||||
//#include "dbgmem.h"
|
||||
//#include "typeinfo.h"
|
||||
//#include "customtypes.h"
|
||||
//#include "typedvar.h"
|
||||
//#include "cpureg.h"
|
||||
//#include "disasm.h"
|
||||
//#include "stkframe.h"
|
||||
//#include "bpoint.h"
|
||||
//#include "eventhandler.h"
|
||||
//#include "pysupport.h"
|
||||
//
|
||||
//#include "win/dbgio.h"
|
||||
//#include "win/windbg.h"
|
||||
//
|
||||
//using namespace pykd;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
static const std::string pykdVersion = PYKD_VERSION_BUILD_STR
|
||||
@ -49,9 +23,10 @@ static const std::string pykdVersion = PYKD_VERSION_BUILD_STR
|
||||
;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
//BOOST_PYTHON_FUNCTION_OVERLOADS( detachProcess_, detachProcess, 0, 1 );
|
||||
//
|
||||
|
||||
BOOST_PYTHON_FUNCTION_OVERLOADS( detachProcess_, kdlib::detachProcess, 0, 1 );
|
||||
BOOST_PYTHON_FUNCTION_OVERLOADS( terminateProcess_, kdlib::terminateProcess, 0, 1 );
|
||||
|
||||
BOOST_PYTHON_FUNCTION_OVERLOADS( dprint_, kdlib::dprint, 1, 2 );
|
||||
BOOST_PYTHON_FUNCTION_OVERLOADS( dprintln_, kdlib::dprintln, 1, 2 );
|
||||
|
||||
@ -109,10 +84,10 @@ BOOST_PYTHON_MODULE( pykd )
|
||||
"Start process for debugging" );
|
||||
python::def( "attachProcess", &kdlib::attachProcess,
|
||||
"Attach debugger to a exsisting process" );
|
||||
// python::def( "detachProcess", &detachProcess, detachProcess_( boost::python::args( "pid" ),
|
||||
// "Stop process debugging") );
|
||||
python::def( "killProcess", &kdlib::terminateProcess,
|
||||
"Stop debugging and terminate current process" );
|
||||
python::def( "detachProcess", &kdlib::detachProcess, detachProcess_( boost::python::args( "pid" ),
|
||||
"Stop process debugging") );
|
||||
python::def( "killProcess", &kdlib::terminateProcess, terminateProcess_( boost::python::args( "pid" ),
|
||||
"Stop debugging and terminate current process" ) );
|
||||
python::def( "loadDump", &kdlib::loadDump,
|
||||
"Load crash dump");
|
||||
python::def( "isDumpAnalyzing", &kdlib::isDumpAnalyzing,
|
||||
@ -124,18 +99,18 @@ BOOST_PYTHON_MODULE( pykd )
|
||||
python::def( "writeDump", &kdlib::writeDump,
|
||||
"Create memory dump file" );
|
||||
|
||||
// python::def( "breakin", &debugBreak,
|
||||
// "Break into debugger" );
|
||||
// python::def( "expr", &evaluate,
|
||||
python::def( "breakin", &targetBreak,
|
||||
"Break into debugger" );
|
||||
//python::def( "expr", &evaluate,
|
||||
// "Evaluate windbg expression" );
|
||||
// python::def( "dbgCommand", &debugCommand,
|
||||
//python::def( "dbgCommand", &debugCommand,
|
||||
// "Run a debugger's command and return it's result as a string" );
|
||||
python::def( "go", &targetGo,
|
||||
"Go debugging" );
|
||||
// python::def( "step", &debugStep,
|
||||
// "The target is executing a single instruction or--if that instruction is a subroutine call--subroutine" );
|
||||
// python::def( "trace", &debugStepIn,
|
||||
// "The target is executing a single instruction" );
|
||||
python::def( "step", &targetStep,
|
||||
"The target is executing a single instruction or--if that instruction is a subroutine call--subroutine" );
|
||||
python::def( "trace", &targetStepIn,
|
||||
"The target is executing a single instruction" );
|
||||
|
||||
// Debug output
|
||||
python::def( "dprint", &kdlib::dprint, dprint_( python::args( "str", "dml" ),
|
||||
|
Loading…
Reference in New Issue
Block a user