Microsoft KB Archive/259924

= The COFF type debug information no longer contains line numbers in Visual C++ =

Article ID: 259924

Article Last Modified on 12/30/2005

-

APPLIES TO


 * Microsoft Visual C++ 6.0 Enterprise Edition
 * Microsoft Visual C++ 6.0 Professional Edition
 * Microsoft Visual C++ 6.0 Standard Edition
 * Microsoft Visual C++ 2005 Express Edition
 * Microsoft Visual C++ .NET 2003 Standard Edition
 * Microsoft Visual C++ .NET 2002 Standard Edition

-



This article was previously published under Q259924



SUMMARY
The Common Object File Format (COFF) type debug information that is generated by using Visual C++ version 6.0 does not contain line-number information. COFF type debug information in earlier versions of Visual C++, such as Visual C++ version 5.0, does contain line-number information.



MORE INFORMATION
The Visual C++ 6.0 compiler generates the line-number information and places this information in the .obj files. However, the linker strips the line numbers before producing the final binary image (.exe, .dll, .ocx, and so on). This is by design.

You can use the Dumpbin.exe utility that is shipped with Visual C++ to find out whether line numbers were stripped. Open an MS-DOS command prompt and type the following:

dumpbin.exe /HEADERS myexe.exe | more

In the &quot;FILE HEADER VALUES&quot; section you will see &quot;Line numbers stripped&quot;; you won't see this line when you view the header values of the corresponding .obj file.

