1
0
Fork 0

DBG: add (undocumented) option to force load PDB

This commit is contained in:
Duncan Ogilvie 2018-09-11 18:08:42 +02:00
parent da913f7cdc
commit 70cfec4094
5 changed files with 8 additions and 3 deletions

View File

@ -1010,6 +1010,7 @@ extern "C" DLL_EXPORT duint _dbg_sendmessage(DBGMSG type, void* param1, void* pa
bVerboseExceptionLogging = settingboolget("Engine", "VerboseExceptionLogging");
bNoWow64SingleStepWorkaround = settingboolget("Engine", "NoWow64SingleStepWorkaround");
bQueryWorkingSet = settingboolget("Misc", "QueryWorkingSet");
bForceLoadSymbols = settingboolget("Misc", "ForceLoadSymbols");
stackupdatesettings();
duint setting;

View File

@ -86,6 +86,7 @@ bool bNoForegroundWindow = false;
bool bVerboseExceptionLogging = true;
bool bNoWow64SingleStepWorkaround = false;
bool bTraceBrowserNeedsUpdate = false;
bool bForceLoadSymbols = false;
duint DbgEvents = 0;
duint maxSkipExceptionCount = 10000;
HANDLE mProcHandle;

View File

@ -123,6 +123,7 @@ extern bool bIgnoreInconsistentBreakpoints;
extern bool bNoForegroundWindow;
extern bool bVerboseExceptionLogging;
extern bool bNoWow64SingleStepWorkaround;
extern bool bForceLoadSymbols;
extern duint maxSkipExceptionCount;
extern HANDLE mProcHandle;
extern HANDLE mForegroundHandle;

View File

@ -571,8 +571,6 @@ void ReadDebugDirectory(MODINFO & Info, ULONG_PTR FileMapVA)
strncat_s(pdbPath, ".pdb", _TRUNCATE);
Info.pdbPaths.push_back(pdbPath);
}
}
}
@ -1119,7 +1117,7 @@ bool MODINFO::loadSymbols()
{
GuiSymbolLogAdd(StringUtils::sprintf("[DIA] Skipping non-existent PDB: %s\n", pdbPath.c_str()).c_str());
}
else if(symSource->loadPDB(pdbPath, base, size, &validationData))
else if(symSource->loadPDB(pdbPath, base, size, bForceLoadSymbols ? nullptr : &validationData))
{
symSource->resizeSymbolBitmap(size);

View File

@ -320,6 +320,10 @@ bool PDBDiaFile::open(const wchar_t* file, uint64_t loadAddress, DiaValidationDa
}
}
}
else
{
GuiSymbolLogAdd("Skipping PDB validation, expect invalid results!\n");
}
if(loadAddress != 0)
{