mirror of
https://github.com/ivellioscolin/pykd.git
synced 2025-04-21 12:24:52 +08:00
[0.2.x] fixed : Abnormal process termination after setCurrentProcess, setImplicitThread
git-svn-id: https://pykd.svn.codeplex.com/svn@81650 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
parent
a2e37c415e
commit
cd3a99a496
@ -5,6 +5,7 @@ namespace pykd {
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
ULONG64 addr64( ULONG64 offset );
|
ULONG64 addr64( ULONG64 offset );
|
||||||
|
ULONG64 addr64NoSafe( ULONG64 addr );
|
||||||
void readMemory( ULONG64 offset, PVOID buffer, ULONG length, bool phyAddr = FALSE, ULONG *readed = NULL );
|
void readMemory( ULONG64 offset, PVOID buffer, ULONG length, bool phyAddr = FALSE, ULONG *readed = NULL );
|
||||||
bool readMemoryUnsafe( ULONG64 offset, PVOID buffer, ULONG length, bool phyAddr = FALSE, ULONG *readed = NULL );
|
bool readMemoryUnsafe( ULONG64 offset, PVOID buffer, ULONG length, bool phyAddr = FALSE, ULONG *readed = NULL );
|
||||||
bool isVaValid( ULONG64 addr );
|
bool isVaValid( ULONG64 addr );
|
||||||
|
@ -1172,7 +1172,7 @@ void setCurrentProcess( ULONG64 processAddr )
|
|||||||
|
|
||||||
HRESULT hres;
|
HRESULT hres;
|
||||||
|
|
||||||
processAddr = addr64(processAddr);
|
processAddr = addr64NoSafe(processAddr);
|
||||||
hres = g_dbgEng->system->SetImplicitProcessDataOffset( processAddr );
|
hres = g_dbgEng->system->SetImplicitProcessDataOffset( processAddr );
|
||||||
if ( FAILED( hres ) )
|
if ( FAILED( hres ) )
|
||||||
throw DbgException( "IDebugSystemObjects2::SetImplicitProcessDataOffset failed" );
|
throw DbgException( "IDebugSystemObjects2::SetImplicitProcessDataOffset failed" );
|
||||||
@ -1186,7 +1186,7 @@ void setImplicitThread( ULONG64 threadAddr )
|
|||||||
|
|
||||||
HRESULT hres;
|
HRESULT hres;
|
||||||
|
|
||||||
threadAddr = addr64(threadAddr);
|
threadAddr = addr64NoSafe(threadAddr);
|
||||||
hres = g_dbgEng->system->SetImplicitThreadDataOffset( threadAddr );
|
hres = g_dbgEng->system->SetImplicitThreadDataOffset( threadAddr );
|
||||||
if ( FAILED( hres ) )
|
if ( FAILED( hres ) )
|
||||||
throw DbgException( "IDebugSystemObjects2::SetImplicitThreadDataOffset failed" );
|
throw DbgException( "IDebugSystemObjects2::SetImplicitThreadDataOffset failed" );
|
||||||
|
Loading…
Reference in New Issue
Block a user