[!] fixed: loadModule return None for non existin module with out outputing error message

git-svn-id: https://pykd.svn.codeplex.com/svn@58077 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
SND\kernelnet_cp 2010-11-26 14:03:25 +00:00
parent 40960bd9b7
commit a5fd4481fe
2 changed files with 8 additions and 2 deletions

View File

@ -16,7 +16,7 @@ loadModule( const std::string &moduleName )
ULONG64 moduleBase;
hres = dbgExt->symbols->GetModuleByModuleName( moduleName.c_str(), 0, NULL, &moduleBase );
if ( FAILED( hres ) )
throw DbgException( "IDebugSymbol::GetModuleByModuleName failed" );
return boost::python::object();
DEBUG_MODULE_PARAMETERS moduleParam = { 0 };
hres = dbgExt->symbols->GetModuleParameters( 1, &moduleBase, 0, &moduleParam );

View File

@ -6,13 +6,19 @@ def printStack():
threadList = getThreadList()
oldMode = getProcessorMode()
if oldMode == "X64" and loadModule( "wow64" ) != None:
setProcessorMode("X86")
for threadPtr in threadList:
oldThread = 0
setImplicitThread( threadPtr )
stackFrames = getCurrentStack()
for frame in stackFrames: dprintln( findSymbol( frame.instructionOffset ) + " (%x)" % frame.instructionOffset )
dprintln("")
setProcessorMode(oldMode)
if __name__ == "__main__":