1
0
Fork 0

DBG: allow loading of the CV record in download symbol command

This commit is contained in:
Mr. eXoDia 2016-06-19 00:14:54 +02:00
parent 19265d66c8
commit b82a5d79ba
2 changed files with 10 additions and 0 deletions

View File

@ -1849,6 +1849,7 @@ CMDRESULT cbDebugSetPriority(int argc, char* argv[])
CMDRESULT cbDebugDownloadSymbol(int argc, char* argv[])
{
dputs("This may take very long, depending on your network connection and data in the debug directory...");
char szDefaultStore[MAX_SETTING_SIZE] = "";
const char* szSymbolStore = szDefaultStore;
if(!BridgeSettingGet("Symbols", "DefaultStore", szDefaultStore)) //get default symbol store from settings
@ -1897,12 +1898,16 @@ CMDRESULT cbDebugDownloadSymbol(int argc, char* argv[])
dputs("SymUnloadModule64 failed!");
return STATUS_ERROR;
}
auto symOptions = SafeSymGetOptions();
SafeSymSetOptions(symOptions & ~SYMOPT_IGNORE_CVREC);
if(!SafeSymLoadModuleExW(fdProcessInfo->hProcess, 0, wszModulePath, 0, (DWORD64)modbase, 0, 0, 0)) //load module
{
dputs("SymLoadModuleEx failed!");
SafeSymSetOptions(symOptions);
SafeSymSetSearchPathW(fdProcessInfo->hProcess, szOldSearchPath);
return STATUS_ERROR;
}
SafeSymSetOptions(symOptions);
if(!SafeSymSetSearchPathW(fdProcessInfo->hProcess, szOldSearchPath))
{
dputs("SymSetSearchPathW (2) failed!");

View File

@ -168,6 +168,9 @@ void SymDownloadAllSymbols(const char* SymbolStore)
return;
}
auto symOptions = SafeSymGetOptions();
SafeSymSetOptions(symOptions & ~SYMOPT_IGNORE_CVREC);
// Reload
for(auto & module : modList)
{
@ -193,6 +196,8 @@ void SymDownloadAllSymbols(const char* SymbolStore)
}
}
SafeSymSetOptions(symOptions);
// Restore the old search path
if(!SafeSymSetSearchPathW(fdProcessInfo->hProcess, oldSearchPath))
dputs("SymSetSearchPathW (2) failed!");