mirror of
https://github.com/ivellioscolin/pykd.git
synced 2025-04-20 03:23:23 +08:00
[~] remove addr64Ex
git-svn-id: https://pykd.svn.codeplex.com/svn@63646 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
parent
eb834c22f5
commit
b9bee1c112
@ -52,48 +52,41 @@ loadMemory( ULONG64 address, PVOID dest, ULONG length, BOOLEAN phyAddr )
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ULONG64
|
||||
addr64Ex( ULONG64 addr, IDebugControl *control )
|
||||
addr64( ULONG64 addr)
|
||||
{
|
||||
HRESULT hres;
|
||||
|
||||
try {
|
||||
|
||||
ULONG processorMode;
|
||||
hres = control->GetActualProcessorType( &processorMode );
|
||||
hres = dbgExt->control->GetActualProcessorType( &processorMode );
|
||||
if ( FAILED( hres ) )
|
||||
throw DbgException( "IDebugControl::GetEffectiveProcessorType failed" );
|
||||
|
||||
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" );
|
||||
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;
|
||||
}
|
||||
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" );
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ULONG64 addr64( ULONG64 addr )
|
||||
{
|
||||
return addr64Ex(addr, dbgExt->control);
|
||||
return addr;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -79,9 +79,6 @@ loadWStrToBuffer( ULONG64 address, PWCHAR buffer, ULONG bufferLen );
|
||||
bool
|
||||
compareMemory( ULONG64 addr1, ULONG64 addr2, ULONG length, BOOLEAN phyAddr = FALSE );
|
||||
|
||||
ULONG64
|
||||
addr64Ex( ULONG64 addr, IDebugControl *control );
|
||||
|
||||
ULONG64
|
||||
addr64( ULONG64 addr );
|
||||
|
||||
|
@ -30,17 +30,15 @@ struct ModuleInfo
|
||||
{
|
||||
}
|
||||
ModuleInfo(
|
||||
const IMAGEHLP_MODULEW64 &dbgImageHelperInfo,
|
||||
IDebugControl *control = dbgExt->control
|
||||
const IMAGEHLP_MODULEW64 &dbgImageHelperInfo
|
||||
) : m_base(addr64(dbgImageHelperInfo.BaseOfImage))
|
||||
, m_timeDataStamp(dbgImageHelperInfo.TimeDateStamp)
|
||||
, m_checkSumm(dbgImageHelperInfo.CheckSum)
|
||||
{
|
||||
}
|
||||
ModuleInfo(
|
||||
const DEBUG_MODULE_PARAMETERS &dbgModuleParameters,
|
||||
IDebugControl *control = dbgExt->control
|
||||
) : m_base(addr64Ex(dbgModuleParameters.Base, control))
|
||||
const DEBUG_MODULE_PARAMETERS &dbgModuleParameters
|
||||
) : m_base(addr64(dbgModuleParameters.Base))
|
||||
, m_timeDataStamp(dbgModuleParameters.TimeDateStamp)
|
||||
, m_checkSumm(dbgModuleParameters.Checksum)
|
||||
{
|
||||
@ -168,4 +166,4 @@ loadModule( const std::string &moduleName );
|
||||
boost::python::object
|
||||
findModule( ULONG64 addr );
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
Loading…
Reference in New Issue
Block a user