DBG: allow loading of the CV record in download symbol command
This commit is contained in:
parent
19265d66c8
commit
b82a5d79ba
|
@ -1849,6 +1849,7 @@ CMDRESULT cbDebugSetPriority(int argc, char* argv[])
|
||||||
|
|
||||||
CMDRESULT cbDebugDownloadSymbol(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] = "";
|
char szDefaultStore[MAX_SETTING_SIZE] = "";
|
||||||
const char* szSymbolStore = szDefaultStore;
|
const char* szSymbolStore = szDefaultStore;
|
||||||
if(!BridgeSettingGet("Symbols", "DefaultStore", szDefaultStore)) //get default symbol store from settings
|
if(!BridgeSettingGet("Symbols", "DefaultStore", szDefaultStore)) //get default symbol store from settings
|
||||||
|
@ -1897,12 +1898,16 @@ CMDRESULT cbDebugDownloadSymbol(int argc, char* argv[])
|
||||||
dputs("SymUnloadModule64 failed!");
|
dputs("SymUnloadModule64 failed!");
|
||||||
return STATUS_ERROR;
|
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
|
if(!SafeSymLoadModuleExW(fdProcessInfo->hProcess, 0, wszModulePath, 0, (DWORD64)modbase, 0, 0, 0)) //load module
|
||||||
{
|
{
|
||||||
dputs("SymLoadModuleEx failed!");
|
dputs("SymLoadModuleEx failed!");
|
||||||
|
SafeSymSetOptions(symOptions);
|
||||||
SafeSymSetSearchPathW(fdProcessInfo->hProcess, szOldSearchPath);
|
SafeSymSetSearchPathW(fdProcessInfo->hProcess, szOldSearchPath);
|
||||||
return STATUS_ERROR;
|
return STATUS_ERROR;
|
||||||
}
|
}
|
||||||
|
SafeSymSetOptions(symOptions);
|
||||||
if(!SafeSymSetSearchPathW(fdProcessInfo->hProcess, szOldSearchPath))
|
if(!SafeSymSetSearchPathW(fdProcessInfo->hProcess, szOldSearchPath))
|
||||||
{
|
{
|
||||||
dputs("SymSetSearchPathW (2) failed!");
|
dputs("SymSetSearchPathW (2) failed!");
|
||||||
|
|
|
@ -168,6 +168,9 @@ void SymDownloadAllSymbols(const char* SymbolStore)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
auto symOptions = SafeSymGetOptions();
|
||||||
|
SafeSymSetOptions(symOptions & ~SYMOPT_IGNORE_CVREC);
|
||||||
|
|
||||||
// Reload
|
// Reload
|
||||||
for(auto & module : modList)
|
for(auto & module : modList)
|
||||||
{
|
{
|
||||||
|
@ -193,6 +196,8 @@ void SymDownloadAllSymbols(const char* SymbolStore)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SafeSymSetOptions(symOptions);
|
||||||
|
|
||||||
// Restore the old search path
|
// Restore the old search path
|
||||||
if(!SafeSymSetSearchPathW(fdProcessInfo->hProcess, oldSearchPath))
|
if(!SafeSymSetSearchPathW(fdProcessInfo->hProcess, oldSearchPath))
|
||||||
dputs("SymSetSearchPathW (2) failed!");
|
dputs("SymSetSearchPathW (2) failed!");
|
||||||
|
|
Loading…
Reference in New Issue