@@ -746,7 +746,12 @@ internal bool GetPhysicalFileFromServer(string serverPath, string pdbIndexPath,
746746 {
747747 if ( Uri . IsWellFormedUriString ( serverPath , UriKind . Absolute ) )
748748 {
749- var fullUri = serverPath + "/" + pdbIndexPath . Replace ( '\\ ' , '/' ) ;
749+ var fullUri = serverPath ;
750+ var tail = pdbIndexPath . Replace ( '\\ ' , '/' ) ;
751+ if ( ! tail . StartsWith ( "/" ) )
752+ fullUri += "/" + tail ;
753+ else
754+ fullUri += tail ;
750755 try
751756 {
752757 var req = ( System . Net . HttpWebRequest ) System . Net . HttpWebRequest . Create ( fullUri ) ;
@@ -1659,6 +1664,8 @@ internal void LogManagedInfo(string pdbName, Guid pdbGuid, int pdbAge)
16591664 /// Gets the 'srcsvc' data stream from the PDB and return it in as a string. Returns null if it is not present.
16601665 ///
16611666 /// There is a tool called pdbstr associated with srcsrv that basically does this.
1667+ /// pdbstr -r -s:srcsrv -p:PDBPATH
1668+ /// will dump it.
16621669 /// </summary>
16631670 internal string GetSrcSrvStream ( )
16641671 {
@@ -2115,6 +2122,21 @@ public bool ChecksumMatches
21152122 /// information from the PDB from 'pdbPath'. Will return a path to the returned file (uses
21162123 /// SourceCacheDirectory associated symbol reader for context where to put the file),
21172124 /// or null if unsuccessful.
2125+ ///
2126+ /// There is a tool called pdbstr associated with srcsrv that basically does this.
2127+ /// pdbstr -r -s:srcsrv -p:PDBPATH
2128+ /// will dump it.
2129+ ///
2130+ /// The basic flow is
2131+ ///
2132+ /// There is a variables section and a files section
2133+ ///
2134+ /// The file section is a list of items separated by *. The first is the path, the rest are up to you
2135+ ///
2136+ /// You form a command by using the SRCSRVTRG variable and substituting variables %var1 where var1 is the first item in the * separated list
2137+ /// There are special operators %fnfile%(XXX), etc that manipulate the string XXX (get file name, translate \ to / ...
2138+ ///
2139+ /// If what is at the end is a valid URL it is looked up.
21182140 /// </summary>
21192141 string GetSourceFromSrcServer ( )
21202142 {
@@ -2162,7 +2184,7 @@ string GetSourceFromSrcServer()
21622184 if ( pieces . Length >= 2 )
21632185 {
21642186 var buildTimePath = pieces [ 0 ] ;
2165- // log.WriteLine("Found source {0} in the PDB", buildTimePath);
2187+ log . WriteLine ( "Found source {0} in the PDB" , buildTimePath ) ;
21662188 if ( string . Compare ( BuildTimeFilePath , buildTimePath , StringComparison . OrdinalIgnoreCase ) == 0 )
21672189 {
21682190 // Create variables for each of the pieces.
@@ -2174,7 +2196,6 @@ string GetSourceFromSrcServer()
21742196 {
21752197 if ( Uri . IsWellFormedUriString ( target , UriKind . Absolute ) )
21762198 {
2177- log . WriteLine ( "Fetching file {0} from web." , target ) ;
21782199 var url = target ;
21792200 target = null ;
21802201 if ( vars . ContainsKey ( "HTTP_ALIAS" ) )
@@ -2327,9 +2348,15 @@ private static string FindTfExe()
23272348
23282349 private string SourceServerFetchVar ( string variable , Dictionary < string , string > vars )
23292350 {
2351+ var log = m_symbolModule . m_reader . m_log ;
23302352 string result = "" ;
23312353 if ( vars . TryGetValue ( variable , out result ) )
2354+ {
2355+ if ( 0 <= result . IndexOf ( '%' ) )
2356+ log . WriteLine ( "SourceServerFetchVar: Before Evaluation {0} = '{1}'" , variable , result ) ;
23322357 result = SourceServerEvaluate ( result , vars ) ;
2358+ }
2359+ log . WriteLine ( "SourceServerFetchVar: {0} = '{1}'" , variable , result ) ;
23332360 return result ;
23342361 }
23352362
0 commit comments