mirror of
https://github.com/ivellioscolin/pykd.git
synced 2025-04-21 12:53:23 +08:00
adopted to new version kdlibcpp
This commit is contained in:
parent
5f0d7125a4
commit
d1ac91ae71
2
kdlibcpp
2
kdlibcpp
@ -1 +1 @@
|
||||
Subproject commit 7c3fcfbf80300cf100b6fe98d40662a1c56041b4
|
||||
Subproject commit 199df2e24cc766b2bc1cd531548584b0af6e1a44
|
@ -19,10 +19,10 @@ kdlib::PROCESS_DEBUG_ID startProcess(const std::wstring &processName, const kdl
|
||||
}
|
||||
|
||||
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;
|
||||
return kdlib::attachProcess(pid);
|
||||
return kdlib::attachProcess(pid, flags);
|
||||
}
|
||||
|
||||
inline
|
||||
|
@ -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 );
|
||||
|
||||
@ -477,7 +477,7 @@ void EventHandler::onDebugOutput(const std::wstring& text)
|
||||
python::override pythonHandler = get_override("onDebugOutput");
|
||||
if ( pythonHandler )
|
||||
{
|
||||
pythonHandler(text);
|
||||
pythonHandler(text, flag);
|
||||
}
|
||||
}
|
||||
catch (const python::error_already_set &)
|
||||
|
@ -28,21 +28,21 @@ public:
|
||||
|
||||
EventHandler();
|
||||
|
||||
virtual kdlib::DebugCallbackResult onBreakpoint( kdlib::BREAKPOINT_ID bpId );
|
||||
virtual kdlib::DebugCallbackResult onException( const kdlib::ExceptionInfo &exceptionInfo );
|
||||
virtual kdlib::DebugCallbackResult onModuleLoad( kdlib::MEMOFFSET_64 offset, const std::wstring &name );
|
||||
virtual kdlib::DebugCallbackResult onModuleUnload( kdlib::MEMOFFSET_64 offset, const std::wstring &name );
|
||||
virtual kdlib::DebugCallbackResult onThreadStart();
|
||||
virtual kdlib::DebugCallbackResult onThreadStop();
|
||||
kdlib::DebugCallbackResult onBreakpoint( kdlib::BREAKPOINT_ID bpId ) override;
|
||||
kdlib::DebugCallbackResult onException( const kdlib::ExceptionInfo &exceptionInfo ) override;
|
||||
kdlib::DebugCallbackResult onModuleLoad( kdlib::MEMOFFSET_64 offset, const std::wstring &name ) override;
|
||||
kdlib::DebugCallbackResult onModuleUnload( kdlib::MEMOFFSET_64 offset, const std::wstring &name ) override;
|
||||
kdlib::DebugCallbackResult onThreadStart() override;
|
||||
kdlib::DebugCallbackResult onThreadStop() override;
|
||||
|
||||
virtual void onExecutionStatusChange(kdlib::ExecutionStatus executionStatus);
|
||||
virtual void onCurrentThreadChange(kdlib::THREAD_DEBUG_ID threadid);
|
||||
virtual void onChangeLocalScope();
|
||||
virtual void onChangeSymbolPaths();
|
||||
virtual void onChangeBreakpoints();
|
||||
virtual void onDebugOutput(const std::wstring& text);
|
||||
virtual void onStartInput();
|
||||
virtual void onStopInput();
|
||||
void onExecutionStatusChange(kdlib::ExecutionStatus executionStatus) override;
|
||||
void onCurrentThreadChange(kdlib::THREAD_DEBUG_ID threadid) override;
|
||||
void onChangeLocalScope() override;
|
||||
void onChangeSymbolPaths() override;
|
||||
void onChangeBreakpoints() override;
|
||||
void onDebugOutput(const std::wstring& text, kdlib::OutputFlag) override;
|
||||
void onStartInput() override;
|
||||
void onStopInput() override;
|
||||
|
||||
private:
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
#define PYKD_VERSION_MAJOR 0
|
||||
#define PYKD_VERSION_MINOR 3
|
||||
#define PYKD_VERSION_SUBVERSION 4
|
||||
#define PYKD_VERSION_BUILDNO 3
|
||||
#define PYKD_VERSION_BUILDNO 4
|
||||
|
||||
#define __VER_STR2__(x) #x
|
||||
#define __VER_STR1__(x) __VER_STR2__(x)
|
||||
|
@ -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( attachProcess_, pykd::attachProcess, 1, 2);
|
||||
BOOST_PYTHON_FUNCTION_OVERLOADS( detachProcess_, pykd::detachProcess, 0, 1 );
|
||||
BOOST_PYTHON_FUNCTION_OVERLOADS( terminateProcess_, pykd::terminateProcess, 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"),
|
||||
"Start process for debugging" ) );
|
||||
python::def("attachProcess", pykd::attachProcess,
|
||||
"Attach debugger to a exsisting process");
|
||||
python::def("attachProcess", pykd::attachProcess, attachProcess_(boost::python::args("pid", "debugOptions"),
|
||||
"Attach debugger to a exsisting process"));
|
||||
python::def( "detachProcess", pykd::detachProcess, detachProcess_( boost::python::args( "id" ),
|
||||
"Stop process debugging") );
|
||||
python::def( "detachAllProcesses", pykd::detachAllProcesses,
|
||||
|
Loading…
Reference in New Issue
Block a user