mirror of
https://github.com/ivellioscolin/pykd.git
synced 2025-04-21 04:13:22 +08:00
[!] 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:
parent
ec4432429c
commit
815db55c6a
@ -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;
|
||||||
@ -43,25 +43,7 @@ findSymbolForAddress( ULONG64 addr )
|
|||||||
displace == 0 ? ss << symbolName : ss << symbolName << '+' << std::hex << displace;
|
displace == 0 ? ss << symbolName : ss << symbolName << '+' << std::hex << displace;
|
||||||
|
|
||||||
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 )
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user