Interpreting the Defect Log

The PREfast for Drivers Defect Log, Defects.xml, is an interactive, XML-based report that displays the warnings that PREfast for Drivers generated when it analyzed the code. The Defect Log is the primary output of PREfast for Drivers.

By default, PREfast for Drivers creates the Defect Log file. The default location of the Defects.xml file is %APPDATA%\Microsoft\PFD.

For Windows Vista, the %APPDATA% variable becomes <drive>:\Users\<user>\Application Data.

For Windows XP or Windows Server 2003 the %APPDATA% variable becomes <drive>:\Documents and Settings\<user>\Application Data.

To specify an alternate name or location for the Defect Log, use the /log parameter in the PREfast Build command. If you are using OACR, OACR manages log files for you.

You can open the Defect Log for a given analysis as soon as the analysis is complete. The Defect Log remains available until you delete it, either manually, or by using a PREfast Reset command, or overwriting it by running PREfast for Drivers again. If you use the /noreset option with the PREfast Build command for each run, the Defect Log is not deleted. You can use the /noreset option to create a composite analysis of several PREfast for Driver runs.

This section explains how you use the features of the Defect Log to examine the results of a PREfast for Drivers analysis. This section includes:

Opening the Defect Log

Browsing the Message List

Examining Annotated Source

Displaying the Defect Log at the Command Line

Managing Defect Log Files

 

 

Send comments about this topic to Microsoft

Build date: 5/3/2011

Show: