mirror of
https://github.com/ivellioscolin/pykd.git
synced 2025-04-20 11:34:53 +08:00
[0.3.x] + attachKernel, isLocalKernelDebuggerEnabled
git-svn-id: https://pykd.svn.codeplex.com/svn@85046 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
parent
e8720626b2
commit
128394ff85
@ -111,6 +111,15 @@ void loadDump( const std::wstring &fileName )
|
|||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void attachKernel( const std::wstring &connectOptions )
|
||||||
|
{
|
||||||
|
AutoRestorePyState pystate;
|
||||||
|
|
||||||
|
kdlib::attachKernel(connectOptions);
|
||||||
|
}
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
std::wstring debugCommand( const std::wstring &command )
|
std::wstring debugCommand( const std::wstring &command )
|
||||||
{
|
{
|
||||||
AutoRestorePyState pystate;
|
AutoRestorePyState pystate;
|
||||||
|
@ -18,6 +18,8 @@ kdlib::PROCESS_DEBUG_ID startProcess( const std::wstring &processName );
|
|||||||
kdlib::PROCESS_DEBUG_ID attachProcess( kdlib::PROCESS_ID pid );
|
kdlib::PROCESS_DEBUG_ID attachProcess( kdlib::PROCESS_ID pid );
|
||||||
void loadDump( const std::wstring &fileName );
|
void loadDump( const std::wstring &fileName );
|
||||||
|
|
||||||
|
void attachKernel( const std::wstring &connectOptions = L"" );
|
||||||
|
|
||||||
std::wstring debugCommand( const std::wstring &command );
|
std::wstring debugCommand( const std::wstring &command );
|
||||||
unsigned long long evaluate( const std::wstring &expression );
|
unsigned long long evaluate( const std::wstring &expression );
|
||||||
|
|
||||||
|
@ -30,6 +30,7 @@ static const std::string pykdVersion = PYKD_VERSION_BUILD_STR
|
|||||||
|
|
||||||
BOOST_PYTHON_FUNCTION_OVERLOADS( detachProcess_, kdlib::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( terminateProcess_, kdlib::terminateProcess, 0, 1 );
|
||||||
|
BOOST_PYTHON_FUNCTION_OVERLOADS( attachKernel_, attachKernel, 0, 1 );
|
||||||
|
|
||||||
BOOST_PYTHON_FUNCTION_OVERLOADS( dprint_, kdlib::dprint, 1, 2 );
|
BOOST_PYTHON_FUNCTION_OVERLOADS( dprint_, kdlib::dprint, 1, 2 );
|
||||||
BOOST_PYTHON_FUNCTION_OVERLOADS( dprintln_, kdlib::dprintln, 1, 2 );
|
BOOST_PYTHON_FUNCTION_OVERLOADS( dprintln_, kdlib::dprintln, 1, 2 );
|
||||||
@ -93,6 +94,11 @@ BOOST_PYTHON_MODULE( pykd )
|
|||||||
"Stop debugging and terminate current process" ) );
|
"Stop debugging and terminate current process" ) );
|
||||||
python::def( "loadDump", &loadDump,
|
python::def( "loadDump", &loadDump,
|
||||||
"Load crash dump");
|
"Load crash dump");
|
||||||
|
python::def( "isLocalKernelDebuggerEnabled", &kdlib::isLocalKernelDebuggerEnabled,
|
||||||
|
"Check whether kernel debugging is enabled for the local kernel");
|
||||||
|
python::def( "attachKernel", &attachKernel, attachKernel_( boost::python::args( "connectOptions" ),
|
||||||
|
"Connect the debugger engine to a kernel target.\n"
|
||||||
|
"If connectOptions is not specified - attach to the local kernel") );
|
||||||
python::def( "isDumpAnalyzing", &kdlib::isDumpAnalyzing,
|
python::def( "isDumpAnalyzing", &kdlib::isDumpAnalyzing,
|
||||||
"Check if it is a dump analyzing ( not living debuggee )" );
|
"Check if it is a dump analyzing ( not living debuggee )" );
|
||||||
python::def( "isKernelDebugging", &kdlib::isKernelDebugging,
|
python::def( "isKernelDebugging", &kdlib::isKernelDebugging,
|
||||||
|
Loading…
Reference in New Issue
Block a user