mirror of
https://github.com/ivellioscolin/pykd.git
synced 2025-04-21 04: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 "dbgexcept.h"
|
||||||
#include "dbgmem.h"
|
#include "dbgmem.h"
|
||||||
#include "dbgsym.h"
|
#include "dbgsym.h"
|
||||||
|
#include "dbgcallback.h"
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
@ -148,10 +149,39 @@ dbgModuleClass::reloadSymbols()
|
|||||||
HRESULT hres;
|
HRESULT hres;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
static const char *szReloadParam = "/f "; //"/f /s ";
|
||||||
std::string reloadParam = "/f "; //"/f /s ";
|
std::string reloadParam = szReloadParam;
|
||||||
reloadParam += m_name;
|
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 ) )
|
||||||
|
{
|
||||||
|
// 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 ) )
|
if ( FAILED( hres ) )
|
||||||
throw DbgException( "IDebugSymbol::Reload failed" );
|
throw DbgException( "IDebugSymbol::Reload failed" );
|
||||||
|
Loading…
Reference in New Issue
Block a user