mirror of
https://github.com/ivellioscolin/pykd.git
synced 2025-04-21 12:53:23 +08:00
[!] 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:
parent
40960bd9b7
commit
a5fd4481fe
@ -16,7 +16,7 @@ loadModule( const std::string &moduleName )
|
|||||||
ULONG64 moduleBase;
|
ULONG64 moduleBase;
|
||||||
hres = dbgExt->symbols->GetModuleByModuleName( moduleName.c_str(), 0, NULL, &moduleBase );
|
hres = dbgExt->symbols->GetModuleByModuleName( moduleName.c_str(), 0, NULL, &moduleBase );
|
||||||
if ( FAILED( hres ) )
|
if ( FAILED( hres ) )
|
||||||
throw DbgException( "IDebugSymbol::GetModuleByModuleName failed" );
|
return boost::python::object();
|
||||||
|
|
||||||
DEBUG_MODULE_PARAMETERS moduleParam = { 0 };
|
DEBUG_MODULE_PARAMETERS moduleParam = { 0 };
|
||||||
hres = dbgExt->symbols->GetModuleParameters( 1, &moduleBase, 0, &moduleParam );
|
hres = dbgExt->symbols->GetModuleParameters( 1, &moduleBase, 0, &moduleParam );
|
||||||
|
@ -6,13 +6,19 @@ def printStack():
|
|||||||
|
|
||||||
threadList = getThreadList()
|
threadList = getThreadList()
|
||||||
|
|
||||||
|
oldMode = getProcessorMode()
|
||||||
|
|
||||||
|
if oldMode == "X64" and loadModule( "wow64" ) != None:
|
||||||
|
setProcessorMode("X86")
|
||||||
|
|
||||||
for threadPtr in threadList:
|
for threadPtr in threadList:
|
||||||
oldThread = 0
|
|
||||||
setImplicitThread( threadPtr )
|
setImplicitThread( threadPtr )
|
||||||
stackFrames = getCurrentStack()
|
stackFrames = getCurrentStack()
|
||||||
for frame in stackFrames: dprintln( findSymbol( frame.instructionOffset ) + " (%x)" % frame.instructionOffset )
|
for frame in stackFrames: dprintln( findSymbol( frame.instructionOffset ) + " (%x)" % frame.instructionOffset )
|
||||||
dprintln("")
|
dprintln("")
|
||||||
|
|
||||||
|
setProcessorMode(oldMode)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user