[0.2.x] fixed : Abnormal process termination after findSymbol

git-svn-id: https://pykd.svn.codeplex.com/svn@81657 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
SND\kernelnet_cp 2012-12-05 16:05:42 +00:00 committed by Mikhail I. Izmestev
parent cd3a99a496
commit 6dc5ac2f20
3 changed files with 10 additions and 15 deletions

View File

@ -11,7 +11,7 @@ class DiaLoadCallback2 : public IDiaLoadCallback2 {
std::string *m_openedSymbolFile;
public:
DiaLoadCallback2(std::string *openedSymbolFile = NULL)
: m_nRefCount(1), m_openedSymbolFile(openedSymbolFile)
: m_nRefCount(0), m_openedSymbolFile(openedSymbolFile)
{
}

View File

@ -124,25 +124,17 @@ public:
/* [in] */ DWORD cbData,
/* [out] */ DWORD *pcbData,
/* [size_is][out] */ BYTE *pbData
) override {
try
) override
{
readMemory(
if ( readMemoryUnsafe(
m_loadBase + relativeVirtualAddress,
pbData,
cbData,
FALSE,
pcbData);
pcbData) )
return S_OK;
}
catch( const MemoryException &except )
{
DBG_UNREFERENCED_LOCAL_VARIABLE(except);
}
return S_FALSE;
return E_FAIL; //S_FALSE;
}
};

View File

@ -68,6 +68,9 @@ void readMemory( ULONG64 offset, PVOID buffer, ULONG length, bool phyAddr, ULONG
{
PyThread_StateRestore pyThreadRestore( g_dbgEng->pystate );
if ( readed )
*readed = 0;
HRESULT hres;
if ( phyAddr == false )
{