adopted to new version kdlibcpp

This commit is contained in:
ussrhero 2019-02-04 20:44:05 +03:00
parent 5f0d7125a4
commit d1ac91ae71
6 changed files with 23 additions and 22 deletions

@ -1 +1 @@
Subproject commit 7c3fcfbf80300cf100b6fe98d40662a1c56041b4 Subproject commit 199df2e24cc766b2bc1cd531548584b0af6e1a44

View File

@ -19,10 +19,10 @@ kdlib::PROCESS_DEBUG_ID startProcess(const std::wstring &processName, const kdl
} }
inline inline
kdlib::PROCESS_DEBUG_ID attachProcess(kdlib::PROCESS_ID pid) kdlib::PROCESS_DEBUG_ID attachProcess(kdlib::PROCESS_ID pid, const kdlib::ProcessDebugFlags& flags = kdlib::ProcessDebugDefault)
{ {
AutoRestorePyState pystate; AutoRestorePyState pystate;
return kdlib::attachProcess(pid); return kdlib::attachProcess(pid, flags);
} }
inline inline

View File

@ -468,7 +468,7 @@ void EventHandler::onChangeBreakpoints()
///////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////
void EventHandler::onDebugOutput(const std::wstring& text) void EventHandler::onDebugOutput(const std::wstring& text, kdlib::OutputFlag flag)
{ {
PyEval_RestoreThread( m_pystate ); PyEval_RestoreThread( m_pystate );
@ -477,7 +477,7 @@ void EventHandler::onDebugOutput(const std::wstring& text)
python::override pythonHandler = get_override("onDebugOutput"); python::override pythonHandler = get_override("onDebugOutput");
if ( pythonHandler ) if ( pythonHandler )
{ {
pythonHandler(text); pythonHandler(text, flag);
} }
} }
catch (const python::error_already_set &) catch (const python::error_already_set &)

View File

@ -28,21 +28,21 @@ public:
EventHandler(); EventHandler();
virtual kdlib::DebugCallbackResult onBreakpoint( kdlib::BREAKPOINT_ID bpId ); kdlib::DebugCallbackResult onBreakpoint( kdlib::BREAKPOINT_ID bpId ) override;
virtual kdlib::DebugCallbackResult onException( const kdlib::ExceptionInfo &exceptionInfo ); kdlib::DebugCallbackResult onException( const kdlib::ExceptionInfo &exceptionInfo ) override;
virtual kdlib::DebugCallbackResult onModuleLoad( kdlib::MEMOFFSET_64 offset, const std::wstring &name ); kdlib::DebugCallbackResult onModuleLoad( kdlib::MEMOFFSET_64 offset, const std::wstring &name ) override;
virtual kdlib::DebugCallbackResult onModuleUnload( kdlib::MEMOFFSET_64 offset, const std::wstring &name ); kdlib::DebugCallbackResult onModuleUnload( kdlib::MEMOFFSET_64 offset, const std::wstring &name ) override;
virtual kdlib::DebugCallbackResult onThreadStart(); kdlib::DebugCallbackResult onThreadStart() override;
virtual kdlib::DebugCallbackResult onThreadStop(); kdlib::DebugCallbackResult onThreadStop() override;
virtual void onExecutionStatusChange(kdlib::ExecutionStatus executionStatus); void onExecutionStatusChange(kdlib::ExecutionStatus executionStatus) override;
virtual void onCurrentThreadChange(kdlib::THREAD_DEBUG_ID threadid); void onCurrentThreadChange(kdlib::THREAD_DEBUG_ID threadid) override;
virtual void onChangeLocalScope(); void onChangeLocalScope() override;
virtual void onChangeSymbolPaths(); void onChangeSymbolPaths() override;
virtual void onChangeBreakpoints(); void onChangeBreakpoints() override;
virtual void onDebugOutput(const std::wstring& text); void onDebugOutput(const std::wstring& text, kdlib::OutputFlag) override;
virtual void onStartInput(); void onStartInput() override;
virtual void onStopInput(); void onStopInput() override;
private: private:

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 4 #define PYKD_VERSION_SUBVERSION 4
#define PYKD_VERSION_BUILDNO 3 #define PYKD_VERSION_BUILDNO 4
#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

@ -36,6 +36,7 @@ static const std::string pykdVersion = PYKD_VERSION_BUILD_STR
BOOST_PYTHON_FUNCTION_OVERLOADS( startProcess_, pykd::startProcess, 1, 2 ); BOOST_PYTHON_FUNCTION_OVERLOADS( startProcess_, pykd::startProcess, 1, 2 );
BOOST_PYTHON_FUNCTION_OVERLOADS( attachProcess_, pykd::attachProcess, 1, 2);
BOOST_PYTHON_FUNCTION_OVERLOADS( detachProcess_, pykd::detachProcess, 0, 1 ); BOOST_PYTHON_FUNCTION_OVERLOADS( detachProcess_, pykd::detachProcess, 0, 1 );
BOOST_PYTHON_FUNCTION_OVERLOADS( terminateProcess_, pykd::terminateProcess, 0, 1 ); BOOST_PYTHON_FUNCTION_OVERLOADS( terminateProcess_, pykd::terminateProcess, 0, 1 );
BOOST_PYTHON_FUNCTION_OVERLOADS(closeDump_, pykd::closeDump, 0, 1); BOOST_PYTHON_FUNCTION_OVERLOADS(closeDump_, pykd::closeDump, 0, 1);
@ -160,8 +161,8 @@ void pykd_init()
python::def( "startProcess", pykd::startProcess, startProcess_( boost::python::args( "commandline", "debugOptions"), python::def( "startProcess", pykd::startProcess, startProcess_( boost::python::args( "commandline", "debugOptions"),
"Start process for debugging" ) ); "Start process for debugging" ) );
python::def("attachProcess", pykd::attachProcess, python::def("attachProcess", pykd::attachProcess, attachProcess_(boost::python::args("pid", "debugOptions"),
"Attach debugger to a exsisting process"); "Attach debugger to a exsisting process"));
python::def( "detachProcess", pykd::detachProcess, detachProcess_( boost::python::args( "id" ), python::def( "detachProcess", pykd::detachProcess, detachProcess_( boost::python::args( "id" ),
"Stop process debugging") ); "Stop process debugging") );
python::def( "detachAllProcesses", pykd::detachAllProcesses, python::def( "detachAllProcesses", pykd::detachAllProcesses,