4

The MS source server technology uses an initialization file named srcsrv.ini. One of the values identifies the source server location(s), e.g.,

MYSERVER=\\machine\foobar

The docs leave much unanswered about this value. To start with, I haven't been able to find the significance of the value name, i.e., what's on the left side--and I don't see it used anywhere else. Hewardt & Pravat in Advanced Windows Debugging say "The left side ... represents the project name", but that doesn't seem to jibe with MS's "MYSERVER" example.

What is the significance of the left side? Where else is it used? Does the value reference a server or a project, and is there one per server, or one per project?

chrisd
  • 245
  • 4
  • 12

2 Answers2

3

For anyone looking into this in the future, I received the following information from MS:

The name on the left side is the logical name of a version control server. The name is also used in the source-indexed symbol files (pdb). For example, a symbol file may contain this string value:

  MYSERVER=mymachine1.sys-mygroup.corp.microsoft.com:2003

and the source files are referenced like this in pdb:

  *MYSERVER*/base/myfolder/mycode.c

When SrcSrv starts, it looks at Srcsrv.ini for values; these values override the information contained in the .pdb file:

  "MYSERVER=mymachine.sys-mygroup.corp.microsoft.com:1666" overrides
  "MYSERVER=mymachine1.sys-mygroup.corp.microsoft.com:2003"

This enables users to configure a debugger to use an alternative source control server at debug time. The info is documented at http://msdn.microsoft.com/en-us/library/ms680641.aspx.

So, it is a logical name for a source server, and its value can be changed at debug time to reference a different server than the one originally used when the PDBs were created.

chrisd
  • 245
  • 4
  • 12
  • What you describe is documented in the srcsrv.doc file that comes as part of Debugging Tools for Windows package. I.e., it comes with windbg. – JeffJ Jun 17 '09 at 15:41
  • I'm not sure about other source control servers, but `svnindex` works without needing to specify anything in srcsrv.ini. The actual perl script that embeds `SRCSRV` information in your PDB's (`svn.pm`) derives the server name from the output of the `svn info` command, so winbdg on another machine can always pull the source from the correct place without needing to specify the server in srcsrv.ini. – Mike Spross Mar 31 '11 at 03:32
  • @Mike: I think the whole point of the logical server name is to allow the user to specify a *different* source server than the one embedded in the PDB file. – Daniel Gehriger Sep 02 '12 at 20:54
  • @DanielGehriger: Yeah, you are right. Re-reading this answer makes that very obvious to me now. I'm not sure what the point of my comment was ;-) – Mike Spross Sep 05 '12 at 04:42
0

The way the debugger retrieves your source is by srcsrv using some command line utility. The utility program itself and the command line used varies depending on which type of repository hosts your code. One of the issues preventing retrieval is that when that command line program is invoked it fails. To find out why use the command !sym noisy in WinDBG. It is mostly helpful in diagnosing symbol server issues but for source indexed PDB it also will show the actual command line WinDBG used. Copy the command from the command log window and run it in CMD.EXE to get more details on the failure.

Uri
  • 479
  • 1
  • 4
  • 10