2

I have a simple demo console program to debug but surprisingly windbg can't symbols from Microsoft default store.

I do

.reload /f

I get the summary:

************* Symbol Loading Error Summary ************** 
Module name            Error 
ConsoleApp             PDB not found : cache*
                Unable to locate the .pdb file in this location

                The system cannot find the file specified : SRV*https://msdl.microsoft.com/download/symbols
                The SYMSRV client failed to find a file in the UNC store, or there
                is an invalid UNC store (an invalid path or the pingme.txt file is
                not present in the root directory), or the file is present in the
                symbol server exclusion list.

Symbols file path is

srv*

I was trying to get to work with pdf files of my own application but it can't even find microsoft symbols.

Update

After sorting out other issues, I can reproduce this back. It seems like I was just reading the message wrong. Since the error message was pointing to Microsoft default store, I read it like it didn't find the specified files at Microsoft store...thinking it was not connecting/finding/downloading Microsoft symbols when in fact the major error says it just didn't find my own's application's symbols.

Still, the message is not super clear. For example when I set and add an additional path, says Ok.

0:000> .sympath srv*c:\test\Symbols*https://msdl.microsoft.com/download/symbols;c:\test\hello
DBGHELP: Symbol Search Path: srv*c:\test\symbols*https://msdl.microsoft.com/download/symbols;c:\test\hello
DBGHELP: Symbol Search Path: srv*c:\test\symbols*https://msdl.microsoft.com/download/symbols;c:\test\hello
Symbol search path is: srv*c:\test\Symbols*https://msdl.microsoft.com/download/symbols;c:\test\hello
Expanded Symbol search path is: srv*c:\test\symbols*https://msdl.microsoft.com/download/symbols;c:\test\hello

************* Symbol Path validation summary **************
Response                         Time (ms)     Location
Deferred                                       srv*c:\test\Symbols*https://msdl.microsoft.com/download/symbols
OK                                             c:\test\hello

Now when I .reload /f the symbol loading error summary is this:

************* Symbol Loading Error Summary **************
Module name            Error
App                    The system cannot find the file specified : srv*c:\test\symbols*https://msdl.microsoft.com/download/symbols
                The SYMSRV client failed to find a file in the UNC store, or there
                is an invalid UNC store (an invalid path or the pingme.txt file is
                not present in the root directory), or the file is present in the
                symbol server exclusion list.

                       PDB not found : c:\test\hello\symbols\exe\App.pdb
                Unable to locate the .pdb file in this location

I don't know the why unable to load in the path PDB not found : c:\test\hello\symbols\exe\App.pdb?

zar
  • 11,361
  • 14
  • 96
  • 178
  • this is the correct syntax: `SRV*C:\symbols*https://msdl.microsoft.com/download/symbols` – magicandre1981 Jun 28 '16 at 04:24
  • 1
    Possible duplicate of [How to set up symbols in WinDbg?](http://stackoverflow.com/questions/30019889/how-to-set-up-symbols-in-windbg) – Thomas Weller Jun 28 '16 at 07:14
  • I am not getting this error anymore, probably after I exited and restarted windbg – zar Jun 28 '16 at 20:28
  • Where is the PDB? Did you put it in c:\test\hello, c:\test\hello\symbols or where? Also important: how did you put it there? Copy/paste or using symstore? – Thomas Weller Jun 29 '16 at 14:50
  • @ThomasWeller I didn't really put the pdb file there, I just wanted to see a message it searched there and didn't find it. – zar Jun 29 '16 at 17:14
  • Searched in `c:\test\hello`? It probably does, but does not log that on the Console. As I said, use Process Monitor to see where it really searches. I have updated my answer – Thomas Weller Jun 29 '16 at 18:28

2 Answers2

3

In the output of your WinDbg session there is

************* Symbol Loading Error Summary ************** 
Module name            Error 
ConsoleApp             PDB not found : cache*

so there's a module load error for ConsoleApp, which is your application and not a Microsoft application.

Certainly you have not uploaded the symbols of your application to Microsoft, so the symbols cannot be found on https://msdl.microsoft.com/download/symbols.

It seems to me that your application is

  • either a release build without symbol information at all
  • a debug build with symbol information but the symbols are not found in the path that is specified within the application

Therefore,

  • in addition to the Microsoft symbol server (please use .symfix c:\path\to\microsoft-symbols),
  • make sure you have built PDBs for your application (check your compiler and/or linker settings, depending on the programming language)
  • add your own symbols to the symbol path (.sympath+ c:\path\to\pdb\).
  • .reload the symbols

The syntax srv* is documented, but actually I've never seen someone use it in practice, because people want to benefit from symbols stored locally, which increases the performance.

If it still does not work, use !sym noisy and Process Monitor to troubleshoot loading of the symbols. A file name filter for .pdb should help.

The reason for that is

  • even with !sym noisy, WinDbg does not list all paths where it is actually looking for symbols
  • the documentation for the symbol load order is incorrect.

    The help file says that symbols are loaded in this order

    • X:\...\symbols\<ext>\<filename>.pdb
    • X:\...\<ext>\<filename>.pdb
    • X:\...\<filename>.pdb

    But the load order observed by me is

    • X:\...\<filename>.pdb
    • X:\...\<ext>\<filename>.pdb
    • X:\...\symbols\<ext>\<filename>.pdb
Thomas Weller
  • 55,411
  • 20
  • 125
  • 222
  • I can reproduce it after fixing the other issues, sound like I was reading it wrong..have updated the post. – zar Jun 28 '16 at 22:24
0

what does srv* mean is it all you have got ?
where is the path ?
like say c:\symbols or f:\mycrap\myuselesssymbols etc etc ?

the path should be something like srv*<your LOCAL DIRECTORY>viz X:\yyyyyy*http://msdl.microsoft.com/download/symbols

you can use .symfix to set a default symbol path prior to .reload /f

blabb
  • 8,674
  • 1
  • 18
  • 27
  • this is the path it sets to you do .symfix – zar Jun 28 '16 at 02:47
  • "If you include the string srv* in your symbol path, the debugger uses a symbol server to get symbols from the default symbol store" from [here](https://msdn.microsoft.com/en-us/library/windows/hardware/ff558829(v=vs.85).aspx) – zar Jun 28 '16 at 15:33