How PureCoverage Locates Visual C++ Debug Data

Related Topics

PureCoverage uses debug symbol data and line information to monitor the coverage of functions at function level and line level.

PureCoverage uses debug line information to collect line-by-line coverage data. If debug data is not available for a module, PureCoverage excludes the module.

PureCoverage uses debug symbol data (typically stored in a module, in .pdb or .dbg files associated with the module, or in .map files) to identify functions. If debug symbol data is not available for a function, PureCoverage labels the function UnnamedFunction@<offset>; for example, UnnamedFunction@0x124d.

PureCoverage uses the following search orders when looking for debug files:

For .pdb files (where the original, fully qualified .pdb file name is embedded in the module or the module's corresponding .dbg file):

1.           A .pdb file using the module's current directory but with the original basename.

2.           A .pdb file using the original .pdb file name as specified within the module itself.

3.           A .pdb file using the original basename but in the current working directory.

For .dbg files (where a fully or partially qualified .dbg file name is embedded in the module):

1.           A .dbg file using the module's current directory and current basename.

2.           A .dbg file using the original .dbg file name as specified within the module itself.

3.           A .dbg file using the original basename but in the current working directory.

4.           A .dbg file using the original .dbg file name appended to %SYSTEMROOT%\symbols\<ext>, where <ext> is the module's current extension.

5.           A .dbg file using the original .dbg file name appended to %SYSTEMROOT%\symbols\.

For .map files

1.           A .map file using the module's current directory and current basename.

Notes:

§                  To use selective instrumentation, modules that you select must have debug data, and .exes must also have relocation data.

§                  PureCoverage requires relocation data to collect data at line or function level. If relocation data is not available for a module, PureCoverage excludes the module. To generate relocation data, specify the /fixed:no and /incremental:no linker options in the Project Settings dialog box in Microsoft Visual Studio.

§                  When PureCoverage instruments a debug data file, it writes the instrumented file into the cache directory. PureCoverage reinstruments debug data files (such as .pdb, .map, or .dbg) only when the associated module is reinstrumented.

(C) Copyright IBM Corporation 1993, 2010.