[pykd] added : attachKernel routine ( attach debugger to a kernel target )

git-svn-id: https://pykd.svn.codeplex.com/svn@69212 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
SND\kernelnet_cp 2011-08-22 06:50:38 +00:00
parent 02b54e10da
commit ba4803a89f
4 changed files with 22 additions and 3 deletions

View File

@ -88,4 +88,14 @@ attachProcess( ULONG processId )
/////////////////////////////////////////////////////////////////////////////////
void
attachKernel( const std::wstring param )
{
HRESULT hres;
hres = dbgExt->client5->AttachKernelWide( DEBUG_ATTACH_KERNEL_CONNECTION, param.c_str() );
if ( FAILED( hres ) )
throw DbgException( "IDebugClient5::AttachKernelWide failed" );
}
/////////////////////////////////////////////////////////////////////////////////

View File

@ -13,4 +13,7 @@ startProcess( const std::wstring &processName );
void
attachProcess( ULONG processId );
void
attachKernel( const std::wstring param );
/////////////////////////////////////////////////////////////////////////////////

View File

@ -92,7 +92,9 @@ BOOST_PYTHON_MODULE( pykd )
boost::python::def( "startProcess", &startProcess,
"Start process for debugging (only for console)");
boost::python::def( "attachProcess", &attachProcess,
"Attach debugger to the exsisting process" );
"Attach debugger to a exsisting process" );
boost::python::def( "attachKernel", &attachKernel,
"Attach debugger to a kernel target" );
boost::python::def( "dbgCommand", &dbgCommand,
"Execute debugger command. For example: dbgCommand( \"lmvm nt\" )" );
boost::python::def( "isValid", &isOffsetValid,

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="windows-1251"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
Version="9,00"
Name="targetapp"
ProjectGUID="{C6254E16-AB8E-41EE-887D-31458E93FC68}"
RootNamespace="targetapp"
@ -408,6 +408,10 @@
RelativePath="..\scripts\pykdtest.py"
>
</File>
<File
RelativePath="..\scripts\regtest.py"
>
</File>
<File
RelativePath="..\scripts\target.py"
>