Debugging Tools for Windows

Using SrcSrv

To use SrcSrv with WinDbg, KD, NTSD, or CDB, verify that you have installed a recent version of the Debugging Tools for Windows package (version 6.3 or later). Then, include the text srv* in the source path, followed by the directory specification or UNC path of the source store:

srv*SourceStoreLocation 

For example:

.srcpath srv*\\myserver\myshare;c:\mylocaldir 

Note that this example also includes a local source path element (c:\mylocaldir). If the debugger cannot retrieve the file using SrcSrv, it searches the specified path. Regardless of whether srv* is the first element in the path or appears later, the source server is always searched before any other source path elements.

If a source file is retrieved by SrcSrv, it remains on your hard drive after the debugging session is over. Source files are stored locally in the src subdirectory of the home directory (unlike the symbol server, the source server does not specify a local cache in the srv* syntax itself). The home directory defaults to the Debugging Tools for Windows installation directory; it can be changed by using the !homedir extension or by setting the DBGHELP_HOMEDIR environment variable. If the src subdirectory of the home directory does not already exist, it is created.

Debugging SrcSrv

If you experience any trouble extracting the source files from the debugger, start the debugger with the –n command-line parameter to view the actual source extraction commands along with the output of those commands. The !sym noisy command does the same thing, but you may have already missed important information from previous extraction attempts. This is because the debugger gives up trying to access source from version control repositories that appear to be unreachable.

Retrieving Source Files

If you use the .open (Open Source File) command to open a new source file through SrcSrv, you must include the -m Address parameter.

To facilitate the use of SrcSrv from tools other than the debuggers listed previously, the DbgHelp API provides access to SrcSrv functionality through the SymGetSourceFile function. To retrieve the name of the source file to be retrieved, call the SymEnumSourceFiles or SymGetLineFromAddr64 function. For more details on the DbgHelp API, see the dbghelp.chm documentation, which can be found in the sdk/help subdirectory of the Debugging Tools for Windows installation directory, or see  Debug Help Library on MSDN.

Using AgeStore to Reduce the Cache Size

Any source files downloaded by SrcSrv remain on your hard drive after the debugging session is over. To control the size of the source cache, the AgeStore tool can be used to delete cached files that are older than a specified date or to reduce the contents of the cache below a specified size. For details, see AgeStore.

Build machine: CAPEBUILD