mirror of
https://github.com/ivellioscolin/pykd.git
synced 2025-04-20 03:23:23 +08:00
[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:
parent
cd3a99a496
commit
6dc5ac2f20
@ -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)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -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 )
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user