0

This is my WinDbg target launch link.

From

"E:\software\Windows Kits\10\Debuggers\x86\windbg.exe" -y SRV*
E:\symbol*http://msdl.microsoft.com/download/symbols -b -k com:port=//./pipe/com_1,baud=115200,pipe

to

"E:\software\Windows Kits\10\Debuggers\x86\windbg.exe" -y SRV*[cache*]E:\symbol;D:\projects*http://msdl.microsoft.com/download/symbols -b -k com:port=//./pipe/com_1,baud=115200,pipe

My local symbolic address is D:\projects, The local pdb file is always locked.

Thomas Weller
  • 55,411
  • 20
  • 125
  • 222
kkc
  • 5
  • 2

1 Answers1

1

You are mixing the HTTP server SRV* with the cache cache*. And all in all I wonder why you actually need a cache. It doesn't look like you want one. You may have a larger misunderstanding of how a symbol path works. This answer will not go into all details as well.

Microsoft symbols

Let's begin with the Microsoft symbol server:

SRV*E:\symbol*http://msdl.microsoft.com/download/symbols
  • srv says that this is a HTTP server.
  • E:\symbol says where those symbols shall be stored
  • http://... says where to get the symbols from
  • the individual parts of that definition are separated by *

Your own symbols

What you probably want is to have your local symbols (PDB files on your disk) available. You do that with just

  • D:\projects

and nothing else, where D:\projects is a directory which directly contains the PDB files, which is often the case when you build the project locally on your machine.

If your company has a network share, you simply add the network share:

  • srv to say it's a online resource
  • C:\netsymbols as your local directory
  • \\ourserver\symbols for the network share
  • the individual parts of that definition are separated by * (like before)

If you have a company symbol server via HTTP (like TFS offers), you would use

  • srv to be a HTTP server.
  • E:\oursymbols says where those symbols shall be stored (don't put that directory near your source code, e.g. don't use D:\projects, because that likely contains your projects, not symbols)
  • http://tfs.example.com/myproject for your company's server.
  • the individual parts of that definition are separated by * (like before)

Combination of different symbol paths

You can combine different symbol paths using ;. You typically want to do that in the order of latency and throughput, i.e.

  1. Your local hard disk (like D:\projects)

  2. Your local network (like srv*C:\netsymbols*\\ourserver\symbols or local HTTP servers)

  3. Internet (like Microsoft HTTP server)

     D:\projects;srv*C:\netsymbols*\\ourserver\symbols;srv*E:\oursymbols*http://tfs.example.com/myproject;SRV*E:\symbol*http://msdl.microsoft.com/download/symbols
    

The cache

Now, the symbol cache is a harder to grasp concept. It is defined by

cache*E:\symbolcache
  • cache is the indicator that you want a cache
  • E:\symbolcache is where you want the cache to be on hard disk
  • the individual parts of that definition are separated by * (like before)

The cache will store everything which is right of it. So typically you put that first, giving

cache*E:\symbolcache;D:\projects;srv*C:\netsymbols*\\ourserver\symbols;srv*E:\oursymbols*http://tfs.example.com/myproject;SRV*E:\symbol*http://msdl.microsoft.com/download/symbols

I never used a cache, because I prefer to have individual locations for the different symbols. The cache may be useful if you don't specify HDD locations for each individual part.

Commands

If you're not sure how to construct a symbol path, take a look at .symfix and .sympath+. These will help you get a correct Microsoft symbol server as well as combine other paths correctly. See this answer for more examples on symbol paths and how they work.

Thomas Weller
  • 55,411
  • 20
  • 125
  • 222