mirror of
https://github.com/ivellioscolin/pykd.git
synced 2025-04-21 12:53:23 +08:00
[0.2.x] fixed : IDebugEventCallback::LoadModule exception on kernel debugging
git-svn-id: https://pykd.svn.codeplex.com/svn@80733 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
parent
aaf35eb2da
commit
a2ea430be4
@ -2,7 +2,7 @@
|
||||
#define PYKD_VERSION_MAJOR 0
|
||||
#define PYKD_VERSION_MINOR 2
|
||||
#define PYKD_VERSION_SUBVERSION 0
|
||||
#define PYKD_VERSION_BUILDNO 3
|
||||
#define PYKD_VERSION_BUILDNO 4
|
||||
|
||||
|
||||
#define __VER_STR2__(x) #x
|
||||
|
@ -1015,7 +1015,22 @@ HRESULT STDMETHODCALLTYPE DebugEngine::LoadModule(
|
||||
{
|
||||
PyThread_StateSave pyThreadSave( it->pystate );
|
||||
|
||||
DEBUG_CALLBACK_RESULT ret = it->callback->OnModuleLoad( BaseOffset, std::string(ModuleName) );
|
||||
std::string modName;
|
||||
|
||||
if ( ModuleName )
|
||||
{
|
||||
modName = ModuleName;
|
||||
}
|
||||
else if ( ImageName )
|
||||
{
|
||||
// ïðè ðàáîòîòå kernel îòëàä÷èêà ModuleName ìîæåò áûòü ðàâåí NULL;
|
||||
modName = ImageName;
|
||||
modName.erase( modName.rfind('.') );
|
||||
}
|
||||
else
|
||||
modName = "";
|
||||
|
||||
DEBUG_CALLBACK_RESULT ret = it->callback->OnModuleLoad( BaseOffset, modName );
|
||||
|
||||
result = ret != DebugCallbackNoChange ? ret : result;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user