added getDebugOptions routine (returns debug options)

added changeDebuOptions routine (change debug options)
This commit is contained in:
ussrhero 2018-03-05 12:44:35 +03:00
parent eb2e7d4eb2
commit 5d30d67978
3 changed files with 31 additions and 11 deletions

View File

@ -119,6 +119,20 @@ python::object debugCommand( const std::wstring &command, bool suppressOutput =
return python::object(); return python::object();
} }
inline
kdlib::DebugOptionsSet getDebugOptions()
{
AutoRestorePyState pystate;
return kdlib::getDebugOptions();
}
inline
void changeDebugOptions(kdlib::DebugOptionsSet &addOptions, kdlib::DebugOptionsSet &removeOptions)
{
AutoRestorePyState pystate;
kdlib::changeDebugOptions(addOptions, removeOptions);
}
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// processes end threads // processes end threads

View File

@ -2,7 +2,7 @@
#define PYKD_VERSION_MAJOR 0 #define PYKD_VERSION_MAJOR 0
#define PYKD_VERSION_MINOR 3 #define PYKD_VERSION_MINOR 3
#define PYKD_VERSION_SUBVERSION 3 #define PYKD_VERSION_SUBVERSION 3
#define PYKD_VERSION_BUILDNO 2 #define PYKD_VERSION_BUILDNO 3
#define __VER_STR2__(x) #x #define __VER_STR2__(x) #x
#define __VER_STR1__(x) __VER_STR2__(x) #define __VER_STR1__(x) __VER_STR2__(x)

View File

@ -186,6 +186,11 @@ BOOST_PYTHON_MODULE( pykd )
"Create memory dump file" ); "Create memory dump file" );
python::def( "getLocalProcesses", pykd::getLocalProcesses, python::def( "getLocalProcesses", pykd::getLocalProcesses,
"Return list of runnng processes on the host system" ); "Return list of runnng processes on the host system" );
python::def( "getDebugOptions", pykd::getDebugOptions,
"Return debug options" );
python::def( "changeDebugOptions", pykd::changeDebugOptions,
"Change debug options" );
python::def( "breakin", pykd::targetBreak, python::def( "breakin", pykd::targetBreak,
"Break into debugger" ); "Break into debugger" );
@ -1360,16 +1365,17 @@ BOOST_PYTHON_MODULE( pykd )
.def("__str__", pykd::printSyntheticSymbol, .def("__str__", pykd::printSyntheticSymbol,
"Return object as a string"); "Return object as a string");
//python::class_<pykd::DataAccessor, boost::noncopyable>("dataAccessor", python::enum_<kdlib::DebugOptions>("debugOptions", "Debug options")
// "class for abstract representation of data storage",python::no_init) .value("InitialBreak", kdlib::InitialBreak)
// .def("readByte", &pykd::DataAccessor::readByte) .value("FinalBreak", kdlib::FinalBreak)
// ; .value("PreferDml", kdlib::PreferDml)
;
//python::class_<pykd::ListDataAccessor, kdlib::DataAccessorPtr>("objectAccessor",
// "class for data access to python objects", python::no_init) python::enum_<kdlib::BreakpointAccess>("breakpointAccess", "Breakpoint access types")
// .def( python::init<python::object&>() ) .value("Read", kdlib::Read)
// //.def("readByte", &pykd::ListDataAccessor::readByte, "") .value("Write", kdlib::Write)
// ; .value("Execute", kdlib::Execute)
;
// C++ exception translation to python // C++ exception translation to python
pykd::registerExceptions(); pykd::registerExceptions();