mirror of
https://github.com/ivellioscolin/pykd.git
synced 2025-04-21 04:13:22 +08:00
[pykd] fixed : issue 8578 ( findModule returns None for WOW64 process )
git-svn-id: https://pykd.svn.codeplex.com/svn@63267 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
parent
0fe3d77428
commit
8603390ceb
@ -54,8 +54,37 @@ loadMemory( ULONG64 address, PVOID dest, ULONG length, BOOLEAN phyAddr )
|
|||||||
ULONG64
|
ULONG64
|
||||||
addr64( ULONG64 addr )
|
addr64( ULONG64 addr )
|
||||||
{
|
{
|
||||||
if ( *( (ULONG*)&addr + 1 ) == 0 )
|
HRESULT hres;
|
||||||
return (ULONG64)(LONG)addr;
|
|
||||||
|
try {
|
||||||
|
|
||||||
|
ULONG processorMode;
|
||||||
|
hres = dbgExt->control->GetActualProcessorType( &processorMode );
|
||||||
|
if ( FAILED( hres ) )
|
||||||
|
throw DbgException( "IDebugControl::GetEffectiveProcessorType failed" );
|
||||||
|
|
||||||
|
switch( processorMode )
|
||||||
|
{
|
||||||
|
case IMAGE_FILE_MACHINE_I386:
|
||||||
|
if ( *( (ULONG*)&addr + 1 ) == 0 )
|
||||||
|
return (ULONG64)(LONG)addr;
|
||||||
|
|
||||||
|
case IMAGE_FILE_MACHINE_AMD64:
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
throw DbgException( "Unknown processor type" );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
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 addr;
|
return addr;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user