Вопрос

I have WinDbg set to download symbols to c:\symbols. The symbols for advapi32 (for example) are in c:\symbols\advapi32.pdb\3F32049F550C42B09CF114A1FB8A97E92\advapi32.pdb. The only way I've gotten link.exe, and those other stub exe's to use those symbols is to actually be in the directory c:\symbols\advapi32.pdb\3F32049F550C42B09CF114A1FB8A97E92. So for example dumpbin /exports c:\Windows\SysWOW64\advapi32.dll returns decorated names in that folder like so:

   1770  301 000455C6 UnregisterIdleTask = _UnregisterIdleTask@12
   1771  302          UnregisterTraceGuids (forwarded to ntdll.EtwUnregisterTraceGuids)
   1772  303 000595D8 UpdateTraceA = _UpdateTraceA@16
   1773  304 000595F9 UpdateTraceW = _UpdateTraceW@16
   1774  305 00042BB6 UsePinForEncryptedFilesA = _UsePinForEncryptedFilesA@12
   1775  306 00042BFF UsePinForEncryptedFilesW = _UsePinForEncryptedFilesW@12

And when run from another folder it returns:

   1770  301 000455C6 UnregisterIdleTask
   1771  302          UnregisterTraceGuids (forwarded to ntdll.EtwUnregisterTraceGuids)
   1772  303 000595D8 UpdateTraceA
   1773  304 000595F9 UpdateTraceW
   1774  305 00042BB6 UsePinForEncryptedFilesA
   1775  306 00042BFF UsePinForEncryptedFilesW

Is it possible to get dumpbin to use the dlls downloaded by the symbol server?

Это было полезно?

Решение

Found the answer on the msdn page for symbol paths.

That page states that the windows debuggers get their symbol list from three places:

  • A runtime list set through the windbg menu and the .sympath command e.g. .sympath srv*c:\MyServerSymbols*http://msdl.microsoft.com/download/symbols
  • _NT_ALT_SYMBOL_PATH environment variable
  • _NT_SYMBOL_PATH environment variable

So simply calling SET _NT_SYMBOL_PATH=symsrv*symsrv.dll*c:\symbols2*http://msdl.microsoft.com/download/symbols or adding that value to your permanent environment (e.g. through setx) will cause the symbols to load.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top