[!] bug fixed: findModule does not work for address < 4GB

git-svn-id: https://pykd.svn.codeplex.com/svn@57927 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
SND\kernelnet_cp 2010-11-22 11:39:40 +00:00
parent ec4432429c
commit 815db55c6a

View File

@ -4,6 +4,7 @@
#include "dbgsym.h" #include "dbgsym.h"
#include "dbgexcept.h" #include "dbgexcept.h"
#include "dbgprint.h" #include "dbgprint.h"
#include "dbgmem.h"
///////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////
@ -14,8 +15,7 @@ findSymbolForAddress( ULONG64 addr )
try { try {
if ( *( (ULONG*)&addr + 1 ) == 0 ) addr = addr64( addr );
*( (ULONG*)&addr + 1 ) = 0xFFFFFFFF;
ULONG moduleIndex; ULONG moduleIndex;
ULONG64 moduleBase; ULONG64 moduleBase;
@ -44,24 +44,6 @@ findSymbolForAddress( ULONG64 addr )
return boost::python::object( ss.str() ); return boost::python::object( ss.str() );
/*
std::stringstream ss;
if ( entries == 0 )
{
ss << moduleName << "+" << std::hex << ( addr - moduleBase );
return boost::python::object( ss.str() );
}
char symbolName[0x100];
hres = dbgExt->symbols3->GetSymbolEntryString( &debugId, 0, symbolName, sizeof(symbolName ), NULL );
if ( FAILED( hres ) )
throw DbgException( "IDebugSymbol3::GetSymbolEntryString failed" );
ss << moduleName << "!" << symbolName;
return boost::python::object( ss.str() ); */
} }
catch( std::exception &e ) catch( std::exception &e )
{ {