diff --git a/src/dbg/_exports.cpp b/src/dbg/_exports.cpp index d72f8f90..026f3b74 100644 --- a/src/dbg/_exports.cpp +++ b/src/dbg/_exports.cpp @@ -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; diff --git a/src/dbg/debugger.cpp b/src/dbg/debugger.cpp index 772a0f41..60bdba74 100644 --- a/src/dbg/debugger.cpp +++ b/src/dbg/debugger.cpp @@ -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; diff --git a/src/dbg/debugger.h b/src/dbg/debugger.h index ebf00b62..19e9784c 100644 --- a/src/dbg/debugger.h +++ b/src/dbg/debugger.h @@ -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; diff --git a/src/dbg/module.cpp b/src/dbg/module.cpp index eedeff31..b35da799 100644 --- a/src/dbg/module.cpp +++ b/src/dbg/module.cpp @@ -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); diff --git a/src/dbg/pdbdiafile.cpp b/src/dbg/pdbdiafile.cpp index c268ed88..06888771 100644 --- a/src/dbg/pdbdiafile.cpp +++ b/src/dbg/pdbdiafile.cpp @@ -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) {