mirror of
https://github.com/ivellioscolin/pykd.git
synced 2025-04-20 11:34:53 +08:00
[pykd] fixed : hotfix for dbgClient
[pykd] added: isDumpAnalyzing routine. Check if it is a dump analyzing git-svn-id: https://pykd.svn.codeplex.com/svn@63973 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
parent
1d27cb91d7
commit
05549455be
@ -15,6 +15,8 @@ public:
|
|||||||
DebugCreate( __uuidof(IDebugClient4), (void **)&client );
|
DebugCreate( __uuidof(IDebugClient4), (void **)&client );
|
||||||
|
|
||||||
m_ext = new DbgExt( client );
|
m_ext = new DbgExt( client );
|
||||||
|
|
||||||
|
client->Release();
|
||||||
}
|
}
|
||||||
|
|
||||||
~dbgClient()
|
~dbgClient()
|
||||||
|
@ -87,6 +87,8 @@ BOOST_PYTHON_MODULE( pykd )
|
|||||||
"Check if target system has 64 address space" );
|
"Check if target system has 64 address space" );
|
||||||
boost::python::def( "isKernelDebugging", &isKernelDebugging,
|
boost::python::def( "isKernelDebugging", &isKernelDebugging,
|
||||||
"Check if kernel dubugging is running" );
|
"Check if kernel dubugging is running" );
|
||||||
|
boost::python::def( "isDumpAnalyzing", &isDumpAnalyzing,
|
||||||
|
"Check if it is a dump analyzing ( not living debuggee )" );
|
||||||
boost::python::def( "ptrSize", ptrSize,
|
boost::python::def( "ptrSize", ptrSize,
|
||||||
"Return pointer size ( in bytes )" );
|
"Return pointer size ( in bytes )" );
|
||||||
boost::python::def( "reg", &loadRegister,
|
boost::python::def( "reg", &loadRegister,
|
||||||
@ -339,6 +341,27 @@ BOOST_PYTHON_MODULE( pykd )
|
|||||||
_DEF_PY_CONST(DEBUG_EVENT_CHANGE_ENGINE_STATE);
|
_DEF_PY_CONST(DEBUG_EVENT_CHANGE_ENGINE_STATE);
|
||||||
_DEF_PY_CONST(DEBUG_EVENT_CHANGE_SYMBOL_STATE);
|
_DEF_PY_CONST(DEBUG_EVENT_CHANGE_SYMBOL_STATE);
|
||||||
|
|
||||||
|
// debugger type
|
||||||
|
//_DEF_PY_CONST(DEBUG_CLASS_UNINITIALIZED);
|
||||||
|
//_DEF_PY_CONST(DEBUG_CLASS_KERNEL);
|
||||||
|
//_DEF_PY_CONST(DEBUG_CLASS_USER_WINDOWS);
|
||||||
|
//_DEF_PY_CONST(DEBUG_CLASS_IMAGE_FILE);
|
||||||
|
//
|
||||||
|
//_DEF_PY_CONST(DEBUG_KERNEL_CONNECTION);
|
||||||
|
//_DEF_PY_CONST(DEBUG_KERNEL_LOCAL);
|
||||||
|
//_DEF_PY_CONST(DEBUG_KERNEL_EXDI_DRIVER);
|
||||||
|
//_DEF_PY_CONST(DEBUG_KERNEL_IDNA);
|
||||||
|
//_DEF_PY_CONST(DEBUG_KERNEL_SMALL_DUMP);
|
||||||
|
//_DEF_PY_CONST(DEBUG_KERNEL_DUMP);
|
||||||
|
//_DEF_PY_CONST(DEBUG_KERNEL_FULL_DUMP);
|
||||||
|
|
||||||
|
//_DEF_PY_CONST(DEBUG_USER_WINDOWS_PROCESS);
|
||||||
|
//_DEF_PY_CONST(DEBUG_USER_WINDOWS_PROCESS_SERVER);
|
||||||
|
//_DEF_PY_CONST(DEBUG_USER_WINDOWS_IDNA);
|
||||||
|
//_DEF_PY_CONST(DEBUG_USER_WINDOWS_SMALL_DUMP);
|
||||||
|
//_DEF_PY_CONST(DEBUG_USER_WINDOWS_SMALL_DUMP);
|
||||||
|
//_DEF_PY_CONST(DEBUG_USER_WINDOWS_DUMP);
|
||||||
|
//_DEF_PY_CONST(DEBUG_USER_WINDOWS_DUMP_WINDOWS_CE);
|
||||||
}
|
}
|
||||||
|
|
||||||
#undef _DEF_PY_CONST
|
#undef _DEF_PY_CONST
|
||||||
|
@ -179,3 +179,34 @@ isKernelDebugging()
|
|||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
bool
|
||||||
|
isDumpAnalyzing()
|
||||||
|
{
|
||||||
|
HRESULT hres;
|
||||||
|
bool result = false;
|
||||||
|
|
||||||
|
try {
|
||||||
|
|
||||||
|
ULONG debugClass, debugQualifier;
|
||||||
|
|
||||||
|
hres = dbgExt->control->GetDebuggeeType( &debugClass, &debugQualifier );
|
||||||
|
|
||||||
|
if ( FAILED( hres ) )
|
||||||
|
throw DbgException( "IDebugControl::GetDebuggeeType failed" );
|
||||||
|
|
||||||
|
result = debugQualifier >= DEBUG_DUMP_SMALL;
|
||||||
|
|
||||||
|
}
|
||||||
|
catch( std::exception &e )
|
||||||
|
{
|
||||||
|
dbgExt->control->Output( DEBUG_OUTPUT_ERROR, "pykd error: %s\n", e.what() );
|
||||||
|
}
|
||||||
|
catch(...)
|
||||||
|
{
|
||||||
|
dbgExt->control->Output( DEBUG_OUTPUT_ERROR, "pykd unexpected error\n" );
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -25,4 +25,7 @@ reloadModule( const char * moduleName );
|
|||||||
bool
|
bool
|
||||||
isKernelDebugging();
|
isKernelDebugging();
|
||||||
|
|
||||||
|
bool
|
||||||
|
isDumpAnalyzing();
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////////
|
Loading…
Reference in New Issue
Block a user