mirror of
https://github.com/ivellioscolin/pykd.git
synced 2025-04-19 19:13:22 +08:00
[!] fix:#8229 loadModuel("some_drv") - out message "IDebugSymbol::Reload failed"
git-svn-id: https://pykd.svn.codeplex.com/svn@60723 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
parent
122ec5deea
commit
1afb67fd2e
@ -5,6 +5,7 @@
|
||||
#include "dbgexcept.h"
|
||||
#include "dbgmem.h"
|
||||
#include "dbgsym.h"
|
||||
#include "dbgcallback.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@ -148,13 +149,42 @@ dbgModuleClass::reloadSymbols()
|
||||
HRESULT hres;
|
||||
|
||||
try {
|
||||
|
||||
std::string reloadParam = "/f "; //"/f /s ";
|
||||
static const char *szReloadParam = "/f "; //"/f /s ";
|
||||
std::string reloadParam = szReloadParam;
|
||||
reloadParam += m_name;
|
||||
hres = dbgExt->symbols->Reload( reloadParam.c_str() );
|
||||
|
||||
|
||||
{
|
||||
// try reload module by entered name, "silent mode"
|
||||
OutputReader outputReader( dbgExt->client );
|
||||
hres = dbgExt->symbols->Reload( reloadParam.c_str() );
|
||||
}
|
||||
if ( FAILED( hres ) )
|
||||
throw DbgException( "IDebugSymbol::Reload failed" );
|
||||
{
|
||||
// failed => try reload symbols by image file name
|
||||
char szImageName[MAX_PATH/2];
|
||||
HRESULT hres2 = dbgExt->symbols2->GetModuleNameString(
|
||||
DEBUG_MODNAME_IMAGE,
|
||||
DEBUG_ANY_ID,
|
||||
m_base,
|
||||
szImageName,
|
||||
_countof(szImageName),
|
||||
NULL);
|
||||
if (SUCCEEDED(hres2))
|
||||
{
|
||||
PCSTR szImageFileName = strrchr(szImageName, '\\');
|
||||
if (!szImageFileName)
|
||||
szImageFileName = szImageName;
|
||||
else
|
||||
++szImageFileName;
|
||||
|
||||
reloadParam = szReloadParam;
|
||||
reloadParam += szImageFileName;
|
||||
hres = dbgExt->symbols->Reload( reloadParam.c_str() );
|
||||
}
|
||||
}
|
||||
|
||||
if ( FAILED( hres ) )
|
||||
throw DbgException( "IDebugSymbol::Reload failed" );
|
||||
}
|
||||
catch( std::exception &e )
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user