Hello All,
I “bit the bullet” and installed the community version of Visual Studio :-)
The symbol file management within Visual Studio shares concepts, but not common binary code, with Dbghelp. Here is one stack trace (more are available, upon request) that captures a moment in the process of Visual Studio debug symbol file management:
%1 %2 %3 %4 %5 %6 %7
1 Irp = 0xFFFFD9092B48B0F8 (TDH_INTYPE_POINTER, TDH_OUTTYPE_HEXINT64, 0, 8, 1, )
2 FileObject = 0xFFFFD90931CB07F0 (TDH_INTYPE_POINTER, TDH_OUTTYPE_HEXINT64, 0, 8, 1, )
3 IssuingThreadId = 6404 (TDH_INTYPE_UINT32, TDH_OUTTYPE_UNSIGNEDINT, 0, 4, 1, )
4 CreateOptions = 0x5000060 (TDH_INTYPE_UINT32, TDH_OUTTYPE_HEXINT32, 0, 4, 1, )
5 CreateAttributes = 0x80 (TDH_INTYPE_UINT32, TDH_OUTTYPE_HEXINT32, 0, 4, 1, )
6 ShareAccess = 0x0 (TDH_INTYPE_UINT32, TDH_OUTTYPE_HEXINT32, 0, 4, 1, )
7 FileName = \Device\HarddiskVolume1\Users\Gary\AppData\Local\Temp\SymbolCache\oleaut32.pdb\87091c6a28419368378aae5938a2b2d61\stripped\origin.txt (TDH_INTYPE_UNICODESTRING, TDH_OUTTYPE_STRING, 0, 0, 1, )
Child-SP RetAddr Call Site
000000dd`46e3eb30 00007ff9`eecdb5c7 symbollocator!SymbolLocatorLib::CSymbolLocator::WriteOriginFile+0xc3
000000dd`46e3ee60 00007ff9`eecdd9dd symbollocator!SymbolLocatorLib::CSymbolLocator::LocateSymbolFile+0xff3
000000dd`46e3f360 00000294`69b35853 symbollocator!SymbolLocatorLib::CSymbolLocator::LocateAnyFormatPdbWithChecksums+0xfd
000000dd`46e3f480 00000294`69b069c9 vsdebugeng_impl!SymProvider::CSymbolLocator::LocateAnyFormatPdbWithChecksums+0xe3
000000dd`46e3f530 00000294`69b058ed vsdebugeng_impl!SymProvider::CDiaLoader::LoadPDB+0x675
000000dd`46e3f6f0 00000294`69b04203 vsdebugeng_impl!SymProvider::CDiaLoader::ReloadSymbols+0x43d
000000dd`46e3f890 00007ff9`83f99dbb vsdebugeng_impl!SymProvider::CDiaLoader::TryLoadSymbols+0x83
000000dd`46e3f8e0 00000294`69bba30d vsdebugeng!dispatcher::DkmModuleInstance::TryLoadSymbols+0x93
000000dd`46e3f980 00007ff9`f5860cd3 vsdebugeng_impl!ad7::CALModule::LoadSymbolsThreadPool+0x4d
000000dd`46e3f9b0 00007ff9`f583d79a ntdll!RtlpTpWorkCallback+0x173
000000dd`46e3fa90 00007ff9`f3957374 ntdll!TppWorkerThread+0x68a
000000dd`46e3fd90 00007ff9`f583cc91 KERNEL32!BaseThreadInitThunk+0x14
000000dd`46e3fdc0 00000000`00000000 ntdll!RtlUserThreadStart+0x21
The paths to symallocator and vsdebugeng_impl are “\Program Files\Microsoft Visual Studio\18\Community\Common7\Packages\Debugger\symbollocator.dll” and “\Program Files\Microsoft Visual Studio\18\Community\Common7\Packages\Debugger\vsdebugeng.impl.dll" – quite separate from dbghelp.dll (where SymFindFileInPath lives).
Personally, I would not follow Viorel’s proposal – that looks like it is working around a bug in SymFindFileInPath, which gives the wrong impression. Providing the “calculated” path to the symbol file in the “SearchPath” parameter and getting the same path back (plus filename) via the “FoundFile” parameter is not helpful and a waste of (execution) time.
I am fairly sure that there is no documented method of achieving your goal; practical approaches include deleting everything, enabling “Last Access” updating (I thought that that was the default) and trusting in agestore, or using your undoubted knowledge of the internal symbol file hierarchy structure (GUIDs and Ages) and constructing paths manually.
Gary