diff --git a/pykd/dbgmodule.cpp b/pykd/dbgmodule.cpp index 5508fa2..4ff09f8 100644 --- a/pykd/dbgmodule.cpp +++ b/pykd/dbgmodule.cpp @@ -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 ); diff --git a/samples/stacks.py b/samples/stacks.py index 95baa72..348b869 100644 --- a/samples/stacks.py +++ b/samples/stacks.py @@ -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__":