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. For more information on how PureCoverage locates debug data, click
To generate debug data, compile and link using the debug switches and then place the debug files in the same directory as the module file before you instrument and run the program. If you are building a test case, include a debug switch such as /Zi or /Zd. For example:
cl /Zi test.cpp
You can also get debug data for the C Runtime library by using the switches /MDd, /MLd, or /MTd, as appropriate.
To generate a .map file, link using the /map option. For example, specifying the following option set compiles Test.cpp as an optimized module, without debug data, but the linker generates a .map file:
cl /O2 test.cpp /link /map
Notes:
§ To use selective instrumentation, modules that you select must have debug data, and .exes must also have relocation data.
§ PureCoverage also requires relocation data to collect data at line or function level. If relocation data is not available for a module, PureCoverage excludes the module.
§ By default, PureCoverage uses UnnamedFunction* filters to hide functions without debug symbol data. To display unnamed functions, disable the appropriate filter in the Functions tab in the Filter Manager dialog box.
§ 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.